feat(nvim): add terraform and bash language servers

main
mandlm 2022-06-22 22:09:56 +02:00
parent 8d1dea31b2
commit 6bd007ed86
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
3 changed files with 13 additions and 4 deletions

View File

@ -28,6 +28,9 @@
# LSP
sumneko-lua-language-server
rnix-lsp
terraform-ls
tflint
nodePackages.bash-language-server
];
stateVersion = "22.05";

View File

@ -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")

View File

@ -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),