Skip to content

Commit

Permalink
properly disable lsp signature
Browse files Browse the repository at this point in the history
  • Loading branch information
siduck authored and roy committed Jan 4, 2024
1 parent d7d4da0 commit ec2c322
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lua/core/default_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -79,6 +78,8 @@ M.ui = {
disabled = false,
silent = true, -- silences 'no signature help available' message
},

semantic_tokens = false,
},

term = {
Expand Down
8 changes: 6 additions & 2 deletions lua/plugins/configs/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec2c322

Please sign in to comment.