properly disable lsp signature
This commit is contained in:
parent
d58ec3f55d
commit
1afbaef5c7
|
@ -74,11 +74,7 @@ M.ui = {
|
|||
cheatsheet = { theme = "grid" }, -- simple/grid
|
||||
|
||||
lsp = {
|
||||
signature = {
|
||||
disabled = false,
|
||||
silent = true, -- silences 'no signature help available' message
|
||||
},
|
||||
|
||||
signature = true,
|
||||
semantic_tokens = false,
|
||||
},
|
||||
|
||||
|
|
|
@ -2,27 +2,27 @@ dofile(vim.g.base46_cache .. "lsp")
|
|||
require "nvchad.lsp"
|
||||
|
||||
local M = {}
|
||||
local utils = require "core.utils"
|
||||
|
||||
-- export on_attach & capabilities for custom lspconfigs
|
||||
|
||||
M.on_attach = function(client, bufnr)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
|
||||
utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||
|
||||
-- signature stuff
|
||||
local utils = require "core.utils"
|
||||
local conf = utils.load_config().ui.lsp
|
||||
|
||||
if conf.signature and client.server_capabilities.signatureHelpProvider then
|
||||
require("nvchad.signature").setup(client)
|
||||
end
|
||||
|
||||
-- semanticTokens
|
||||
if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
|
||||
-- signature
|
||||
if conf.signature and client.server_capabilities.signatureHelpProvider then
|
||||
require("nvchad.signature").setup(client, bufnr)
|
||||
end
|
||||
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
|
||||
utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||
end
|
||||
|
||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
|
Loading…
Reference in New Issue