Compare commits

..

No commits in common. "cb18b424b91376bdeb10ed950306a507d43e3dbe" and "d9b3980e6265e692c979e51d483193d9272ca5d1" have entirely different histories.

3 changed files with 15 additions and 22 deletions

View File

@ -1,7 +1,7 @@
local M = {} local M = {}
M.options = { M.options = {
nvchad_branch = "v3.0", nvchad_branch = "v2.0",
} }
M.ui = { M.ui = {
@ -13,6 +13,7 @@ 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"
@ -74,15 +75,14 @@ M.ui = {
cheatsheet = { theme = "grid" }, -- simple/grid cheatsheet = { theme = "grid" }, -- simple/grid
lsp = { lsp = {
signature = true, signature = {
semantic_tokens = false, disabled = false,
silent = true, -- silences 'no signature help available' message
},
}, },
term = { term = {
sizes = { sp = 0.3, vsp = 0.2 }, sizes = { sp = 0.3, vsp = 0.2 },
behavior = {
auto_insert = true,
},
}, },
} }

View File

@ -2,27 +2,23 @@ dofile(vim.g.base46_cache .. "lsp")
require "nvchad.lsp" require "nvchad.lsp"
local M = {} local M = {}
local utils = require "core.utils"
-- export on_attach & capabilities for custom lspconfigs -- export on_attach & capabilities for custom lspconfigs
M.on_attach = function(client, bufnr) M.on_attach = function(client, bufnr)
local utils = require "core.utils"
local conf = utils.load_config().ui.lsp
-- 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.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false client.server_capabilities.documentRangeFormattingProvider = false
utils.load_mappings("lspconfig", { buffer = bufnr }) utils.load_mappings("lspconfig", { buffer = bufnr })
if 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
client.server_capabilities.semanticTokensProvider = nil
end
end end
M.capabilities = vim.lsp.protocol.make_client_capabilities() M.capabilities = vim.lsp.protocol.make_client_capabilities()

View File

@ -16,9 +16,6 @@ local default_plugins = {
"NvChad/ui", "NvChad/ui",
branch = "v3.0", branch = "v3.0",
lazy = false, lazy = false,
config = function()
require "nvchad"
end,
}, },
{ {