refactor: migrate to vim.lsp.config/enable
This commit is contained in:
@@ -48,33 +48,27 @@ M.capabilities.textDocument.completion.completionItem = {
|
||||
}
|
||||
|
||||
M.defaults = function()
|
||||
vim.lsp.config("*", { capabilities = M.capabilities, on_init = M.on_init, on_attach = M.on_attach })
|
||||
|
||||
dofile(vim.g.base46_cache .. "lsp")
|
||||
require("nvchad.lsp").diagnostic_config()
|
||||
|
||||
require("lspconfig").lua_ls.setup {
|
||||
on_attach = M.on_attach,
|
||||
capabilities = M.capabilities,
|
||||
on_init = M.on_init,
|
||||
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
vim.fn.expand "$VIMRUNTIME/lua",
|
||||
vim.fn.expand "$VIMRUNTIME/lua/vim/lsp",
|
||||
vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types",
|
||||
vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy",
|
||||
"${3rd}/luv/library",
|
||||
},
|
||||
maxPreload = 100000,
|
||||
preloadFileSize = 10000,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.enable "lua_ls"
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user