summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-08-27 21:17:20 +0530
committersinanmohd <sinan@firemail.cc>2023-08-27 22:08:00 +0530
commit376703922920c88b0f94c08591faa11065ee04b1 (patch)
tree52a10c3d833ebd3e94df210d3ee326c0152f02cf
parente4a37a1252336e1fef361fdeca2b0c2535437ab3 (diff)
config/nvim: lsp init
-rw-r--r--.config/nvim/init.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 5171b7b..4285f23 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -89,6 +89,17 @@ require("lazy").setup({
end,
},
},
+
+ {
+ "VonHeikemen/lsp-zero.nvim",
+ branch = "v2.x",
+ dependencies = {
+ {"neovim/nvim-lspconfig"},
+ {"hrsh7th/nvim-cmp"},
+ {"hrsh7th/cmp-nvim-lsp"},
+ {"L3MON4D3/LuaSnip"},
+ },
+ },
}, { lockfile = lazylock })
-- [[ treesitter setup ]]
@@ -114,3 +125,16 @@ require("nvim-treesitter.configs").setup {
},
}
}
+
+-- [[ lsp setup ]]
+local lsp = require("lsp-zero").preset{}
+lsp.on_attach(function(_, bufnr)
+ lsp.default_keymaps({buffer = bufnr})
+end)
+
+require("lspconfig").ccls.setup{}
+require("lspconfig").bashls.setup{}
+require("lspconfig").nil_ls.setup{}
+require("lspconfig").lua_ls.setup(lsp.nvim_lua_ls())
+
+lsp.setup()