From e9a2f811b7d030cb8701bd8459fd5c842a521eff Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Tue, 13 May 2025 10:07:17 +0300 Subject: =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20nvim=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/lua/lsp.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'nvim/lua/lsp.lua') diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua index 5f04683..73b92f2 100644 --- a/nvim/lua/lsp.lua +++ b/nvim/lua/lsp.lua @@ -7,11 +7,9 @@ local function config(_config) capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()), }, _config or {}) end - -- иницализация gopls LSP для Go -- https://github.com/golang/tools/blob/master/gopls/doc/vim.md#neovim-install lspconfig.gopls.setup(config({ - on_attach = on_attach, cmd = { "gopls", "serve" }, filetypes = { "go", "go.mod" }, root_dir = util.root_pattern("go.work", "go.mod", ".git"), @@ -19,9 +17,15 @@ lspconfig.gopls.setup(config({ gopls = { analyses = { unusedparams = true, - shadow = true, }, staticcheck = true, + gofumpt = true, }, }, })) + +lspconfig.templ.setup(config({ + cmd = {"templ", "lsp"}, + filetypes = {"templ"}, + root_markers = { "go.work", "go.mod", ".git" }, +})) -- cgit v1.2.3