aboutsummaryrefslogtreecommitdiff
path: root/store/home/config/nvim/lua/setup/lsp/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'store/home/config/nvim/lua/setup/lsp/init.lua')
-rw-r--r--store/home/config/nvim/lua/setup/lsp/init.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/store/home/config/nvim/lua/setup/lsp/init.lua b/store/home/config/nvim/lua/setup/lsp/init.lua
new file mode 100644
index 0000000..e87c2be
--- /dev/null
+++ b/store/home/config/nvim/lua/setup/lsp/init.lua
@@ -0,0 +1,25 @@
+local lspconfig = require("lspconfig")
+local cmp_nvim_lsp = require("cmp_nvim_lsp")
+local cmp_default_caps = cmp_nvim_lsp.default_capabilities()
+
+local lspconfig_default_caps = lspconfig.util.default_config.capabilities
+
+lspconfig.util.default_config = vim.tbl_extend(
+ "force",
+ lspconfig.util.default_config,
+ {
+ capabilities = vim.tbl_extend("force", lspconfig_default_caps, cmp_default_caps),
+ autostart = false,
+ })
+
+local function setup()
+ lspconfig.cmake.setup {}
+ lspconfig.bashls.setup {}
+ require("setup.lsp.clangd").setup()
+ require("setup.lsp.lua_ls").setup()
+end
+
+
+return {
+ setup = setup
+}