Skip to content

Commit e290a58

Browse files
committed
fix(neovim): disable helm_ls internal yamlls diagnostics for Jinja2 templates
- helm_ls spawns yamlls as internal subprocess for YAML validation - This causes "Yamlls:" prefixed errors on Jinja2 cookiecutter templates - Set diagnosticsLimit = 0 to disable yamlls diagnostics entirely - Preserves hover and completion features from yamlls - Solves triple-layer templating issues (Jinja2 + Helm + YAML)
1 parent 5583a49 commit e290a58

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

common/neovim/lua/plugins/lsp.lua

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@ return {
77
inlay_hints = { enabled = false }, -- Disable inlay hints by default (toggle with <leader>uh)
88
-- Configure LSP servers
99
servers = {
10-
-- YAML Language Server - disable for helm templates (which may contain Jinja2)
11-
yamlls = {
12-
filetypes = { "yaml", "yaml.docker-compose", "yaml.gitlab", "yaml.helm-values" },
13-
-- Helm templates are handled by helm_ls, not yamlls
14-
root_dir = function(fname)
15-
local lspconfig = require("lspconfig")
16-
-- Don't attach yamlls to helm chart templates
17-
if fname:match("/templates/.*%.yaml$") or fname:match("/templates/.*%.yml$") then
18-
return nil
19-
end
20-
return lspconfig.util.root_pattern(".git")(fname)
21-
end,
10+
-- Helm Language Server - disable yamlls diagnostics for Jinja2 templates
11+
helm_ls = {
12+
settings = {
13+
["helm-ls"] = {
14+
yamlls = {
15+
diagnosticsLimit = 0, -- Disable yamlls diagnostics (keeps hover/completion)
16+
},
17+
},
18+
},
2219
},
2320
-- TypeScript/JavaScript (updated name)
2421
ts_ls = {

0 commit comments

Comments
 (0)