diff options
| author | 2025-05-13 10:07:17 +0300 | |
|---|---|---|
| committer | 2025-05-13 10:07:17 +0300 | |
| commit | e9a2f811b7d030cb8701bd8459fd5c842a521eff (patch) | |
| tree | 2c59e183408f6d814bdb32453cae84f03f8bf88b /nvim/lua/lsp.lua | |
| parent | Поправил тему zsh (diff) | |
| download | dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.tar.gz dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.tar.bz2 dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.tar.xz dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.zip | |
Правки nvim конфига
Diffstat (limited to '')
| -rw-r--r-- | nvim/lua/lsp.lua | 10 |
1 files changed, 7 insertions, 3 deletions
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" }, +})) |
