mirror of
https://github.com/NvChad/NvChad.git
synced 2025-07-19 00:00:05 -04:00
Compare commits
5 Commits
d9b3980e62
...
cb18b424b9
Author | SHA1 | Date | |
---|---|---|---|
|
cb18b424b9 | ||
|
1afbaef5c7 | ||
|
d58ec3f55d | ||
|
17a8959bea | ||
|
1b20da0115 |
@ -1,7 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
M.options = {
|
||||
nvchad_branch = "v2.0",
|
||||
nvchad_branch = "v3.0",
|
||||
}
|
||||
|
||||
M.ui = {
|
||||
@ -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"
|
||||
@ -75,14 +74,15 @@ M.ui = {
|
||||
cheatsheet = { theme = "grid" }, -- simple/grid
|
||||
|
||||
lsp = {
|
||||
signature = {
|
||||
disabled = false,
|
||||
silent = true, -- silences 'no signature help available' message
|
||||
},
|
||||
signature = true,
|
||||
semantic_tokens = false,
|
||||
},
|
||||
|
||||
term = {
|
||||
sizes = { sp = 0.3, vsp = 0.2 },
|
||||
behavior = {
|
||||
auto_insert = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -2,23 +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)
|
||||
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.documentRangeFormattingProvider = false
|
||||
|
||||
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
|
||||
|
||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
@ -16,6 +16,9 @@ local default_plugins = {
|
||||
"NvChad/ui",
|
||||
branch = "v3.0",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require "nvchad"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user