From d1f6f2fbfdd21acb5d4dc64ef01b8dfca930495f Mon Sep 17 00:00:00 2001 From: tobias Date: Wed, 30 Apr 2025 17:57:19 +0200 Subject: [PATCH] Getting more lsp's configured --- lua/default/lazy/lsp.lua | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) 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