diff options
author | sinanmohd <sinan@firemail.cc> | 2023-08-27 21:17:20 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-08-27 22:08:00 +0530 |
commit | 376703922920c88b0f94c08591faa11065ee04b1 (patch) | |
tree | 52a10c3d833ebd3e94df210d3ee326c0152f02cf /.config | |
parent | e4a37a1252336e1fef361fdeca2b0c2535437ab3 (diff) |
config/nvim: lsp init
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/init.lua | 24 |
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() |