mirror of
https://github.com/NvChad/NvChad.git
synced 2025-07-21 00:00:10 -04:00
Compare commits
No commits in common. "cb18b424b91376bdeb10ed950306a507d43e3dbe" and "d9b3980e6265e692c979e51d483193d9272ca5d1" have entirely different histories.
cb18b424b9
...
d9b3980e62
@ -1,7 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
M.options = {
|
||||
nvchad_branch = "v3.0",
|
||||
nvchad_branch = "v2.0",
|
||||
}
|
||||
|
||||
M.ui = {
|
||||
@ -13,6 +13,7 @@ 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"
|
||||
@ -74,15 +75,14 @@ M.ui = {
|
||||
cheatsheet = { theme = "grid" }, -- simple/grid
|
||||
|
||||
lsp = {
|
||||
signature = true,
|
||||
semantic_tokens = false,
|
||||
signature = {
|
||||
disabled = false,
|
||||
silent = true, -- silences 'no signature help available' message
|
||||
},
|
||||
},
|
||||
|
||||
term = {
|
||||
sizes = { sp = 0.3, vsp = 0.2 },
|
||||
behavior = {
|
||||
auto_insert = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -2,27 +2,23 @@ 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,9 +16,6 @@ local default_plugins = {
|
||||
"NvChad/ui",
|
||||
branch = "v3.0",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require "nvchad"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user