feat(nvim): add terraform and bash language servers
This commit is contained in:
parent
8d1dea31b2
commit
6bd007ed86
3 changed files with 13 additions and 4 deletions
|
@ -28,6 +28,9 @@
|
|||
# LSP
|
||||
sumneko-lua-language-server
|
||||
rnix-lsp
|
||||
terraform-ls
|
||||
tflint
|
||||
nodePackages.bash-language-server
|
||||
];
|
||||
|
||||
stateVersion = "22.05";
|
||||
|
|
|
@ -45,6 +45,7 @@ local capabilities = vim.tbl_extend("keep", vim.lsp.protocol.make_client_capabil
|
|||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||
|
||||
local servers = {
|
||||
["bashls"] = {},
|
||||
["sumneko_lua"] = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
|
@ -56,6 +57,8 @@ local servers = {
|
|||
},
|
||||
},
|
||||
["rnix"] = {},
|
||||
["terraformls"] = {},
|
||||
["tflint"] = {},
|
||||
}
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
|
|
@ -11,13 +11,16 @@ local luasnip = require("luasnip")
|
|||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
sources = require("cmp").config.sources({
|
||||
{ name = "nvim_lsp" }, { name = "luasnip" }, { name = "path" },
|
||||
{ name = "buffer" }, { name = "git" }, { name = "nvim-lua" },
|
||||
{ name = "calc" }
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
{ name = "nvim-lua" },
|
||||
{ name = "calc" },
|
||||
}),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
|
|
Loading…
Reference in a new issue