properly disable lsp signature

https://github.com/NvChad/ui/pull/188#issuecomment-1735510051
This commit is contained in:
siduck 2023-09-26 18:51:34 +05:30
parent 17a8959bea
commit d58ec3f55d
2 changed files with 8 additions and 3 deletions

View File

@ -13,7 +13,6 @@ M.ui = {
theme_toggle = { "onedark", "one_light" }, theme_toggle = { "onedark", "one_light" },
theme = "onedark", -- default theme theme = "onedark", -- default theme
transparency = false, transparency = false,
lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens
-- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations -- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations
extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify" extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify"
@ -79,6 +78,8 @@ M.ui = {
disabled = false, disabled = false,
silent = true, -- silences 'no signature help available' message silent = true, -- silences 'no signature help available' message
}, },
semantic_tokens = false,
}, },
term = { term = {

View File

@ -12,11 +12,15 @@ M.on_attach = function(client, bufnr)
utils.load_mappings("lspconfig", { buffer = bufnr }) utils.load_mappings("lspconfig", { buffer = bufnr })
if client.server_capabilities.signatureHelpProvider then -- signature stuff
local conf = utils.load_config().ui.lsp
if conf.signature and client.server_capabilities.signatureHelpProvider then
require("nvchad.signature").setup(client) require("nvchad.signature").setup(client)
end end
if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then -- semanticTokens
if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then
client.server_capabilities.semanticTokensProvider = nil client.server_capabilities.semanticTokensProvider = nil
end end
end end