feat: Update config to nvim v0.11 lspconfig
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "b3104910bb5ebf40492aadffae18f2528fa757d9" },
|
"LuaSnip": { "branch": "master", "commit": "b3104910bb5ebf40492aadffae18f2528fa757d9" },
|
||||||
"NvChad": { "branch": "v2.5", "commit": "b5b38ebee53bcc8b71a917916ce61504ffffd509" },
|
"NvChad": { "branch": "v2.5", "commit": "b5b38ebee53bcc8b71a917916ce61504ffffd509" },
|
||||||
"base46": { "branch": "v3.0", "commit": "390bbb6cf149dc9da1a91548598c809f62fbc3c6" },
|
"base46": { "branch": "v3.0", "commit": "c3ee258239801e88eb6cd04c596cc292c88b91e5" },
|
||||||
"cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
|
"cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||||
@@ -24,19 +24,19 @@
|
|||||||
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
||||||
"nvim-dap-python": { "branch": "master", "commit": "bfe572e4458e0ac876b9539a1e9f301c72db8ea0" },
|
"nvim-dap-python": { "branch": "master", "commit": "bfe572e4458e0ac876b9539a1e9f301c72db8ea0" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" },
|
"nvim-lspconfig": { "branch": "master", "commit": "1f7fbc34e6420476142b5cc85e9bee52717540fb" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "e179ad2f83b5955ab0af653069a493a1828c2697" },
|
"nvim-tree.lua": { "branch": "master", "commit": "e179ad2f83b5955ab0af653069a493a1828c2697" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "5f437a26a8a8b964eff683dd6f68bc2a0d38c5db" },
|
"render-markdown.nvim": { "branch": "main", "commit": "67f2c7c8850bb11eefa6b22054a6f4cef1146de2" },
|
||||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||||
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
||||||
"sonarlint.nvim": { "branch": "main", "commit": "5c3e0bb647be90cec844022991f33d50b6838964" },
|
"sonarlint.nvim": { "branch": "main", "commit": "dc5702556f90eedce587233f3c1a0ae671ea3648" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
"ui": { "branch": "v3.0", "commit": "4852e04faefbba3a18cb197b76ac00f4bc2e615f" },
|
"ui": { "branch": "v3.0", "commit": "532d566190391f2ddc388a5b1093b0f227366e87" },
|
||||||
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
-- load defaults i.e lua_lsp
|
-- load defaults i.e lua_lsp
|
||||||
require("nvchad.configs.lspconfig").defaults()
|
require("nvchad.configs.lspconfig").defaults()
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = vim.lsp.config
|
||||||
|
local lsputil = require("lspconfig.util")
|
||||||
|
|
||||||
-- EXAMPLE
|
-- EXAMPLE
|
||||||
local servers = { "html", "cssls" }
|
local servers = { "html", "cssls" }
|
||||||
@@ -9,14 +10,14 @@ local nvlsp = require("nvchad.configs.lspconfig")
|
|||||||
|
|
||||||
-- lsps with default config
|
-- lsps with default config
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup({
|
lspconfig(lsp, {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
on_init = nvlsp.on_init,
|
on_init = nvlsp.on_init,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
lspconfig.gopls.setup({
|
lspconfig("gopls", {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
cmd = { "gopls" },
|
cmd = { "gopls" },
|
||||||
@@ -30,7 +31,7 @@ lspconfig.gopls.setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.ts_ls.setup({
|
lspconfig("ts_ls", {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
init_options = {
|
init_options = {
|
||||||
@@ -40,26 +41,26 @@ lspconfig.ts_ls.setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.tailwindcss.setup({
|
lspconfig("tailwindcss", {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.pyright.setup({
|
lspconfig("pyright", {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.eslint.setup({
|
lspconfig("eslint", {
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.golangcilsp = {
|
lspconfig("golangcilsp", {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { "golangci-lint-langserver" },
|
cmd = { "golangci-lint-langserver" },
|
||||||
root_dir = lspconfig.util.root_pattern(".git", "go.mod"),
|
root_dir = lsputil.root_pattern(".git", "go.mod"),
|
||||||
init_options = {
|
init_options = {
|
||||||
command = {
|
command = {
|
||||||
"golangci-lint",
|
"golangci-lint",
|
||||||
@@ -71,13 +72,13 @@ lspconfig.golangcilsp = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|
||||||
lspconfig.golangci_lint_ls.setup({
|
lspconfig("golangci_lint_ls", {
|
||||||
filetypes = { "go", "gomod" },
|
filetypes = { "go", "gomod" },
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.clangd.setup({
|
lspconfig("clangd", {
|
||||||
filetypes = { "c" },
|
filetypes = { "c" },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user