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 = "onedark", -- default theme
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
extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify"
@ -79,6 +78,8 @@ M.ui = {
disabled = false,
silent = true, -- silences 'no signature help available' message
},
semantic_tokens = false,
},
term = {

View File

@ -12,11 +12,15 @@ M.on_attach = function(client, 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)
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
end
end