WIP: update-upstream #4

Closed
cscherrNT wants to merge 69 commits from update-upstream into master
2 changed files with 12 additions and 16 deletions
Showing only changes of commit 1afbaef5c7 - Show all commits

View File

@ -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,
},

View File

@ -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()