diff --git a/lua/default/lazy/lsp.lua b/lua/default/lazy/lsp.lua index 25bb9a0..cb34eff 100644 --- a/lua/default/lazy/lsp.lua +++ b/lua/default/lazy/lsp.lua @@ -28,6 +28,8 @@ return { ensure_installed = { "lua_ls", "ansiblels", + "terraformls", + "pylsp", }, handlers = { function(server_name) -- default handler (optional) @@ -48,7 +50,7 @@ return { executionEnvironment = { enabled = false }, validation = { enabled = false, - lint = { enabled = true, path = 'ansible-lint' }, +-- lint = { enabled = true, path = 'ansible-lint' }, }, }, }, @@ -58,6 +60,26 @@ return { }) end, + ["pylsp"] = function () + local lspconfig = require("lspconfig") + lspconfig["pylsp"].setup({ + cmd = {"pylsp"}, + filetypes = { 'py' }, + root_dir = lspconfig.util.root_pattern("Documents"), + single_file_support = false, + }) + end, + + ["terraformls"] = function () + local lspconfig = require("lspconfig") + lspconfig["terraformls"].setup({ + cmd = {"terraform-ls", "server"}, + filetypes = { 'terraform', 'terraform-vars', 'tf', 'hcl' }, + root_dir = lspconfig.util.root_pattern("Documents"), + single_file_support = false, + }) + end, + ["lua_ls"] = function() local lspconfig = require("lspconfig") @@ -109,4 +131,4 @@ return { }, }) end -} +} \ No newline at end of file