From b1690381850f011abad0bb3e94c03e99a9101e98 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Fri, 25 Sep 2026 17:59:19 +0200 Subject: Added helm stuff --- neovim/.config/nvim/lua/plugins/lsp.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'neovim/.config/nvim/lua/plugins/lsp.lua') diff --git a/neovim/.config/nvim/lua/plugins/lsp.lua b/neovim/.config/nvim/lua/plugins/lsp.lua index 0463dde..3106fcd 100644 --- a/neovim/.config/nvim/lua/plugins/lsp.lua +++ b/neovim/.config/nvim/lua/plugins/lsp.lua @@ -15,11 +15,26 @@ return { "ts_ls", "cssls", "html", + "helm_ls", }, -- default true: auto-calls vim.lsp.enable() for every Mason-installed -- server as it finishes installing. }, config = function(_, opts) + -- helm_ls's default config only attaches to filetype "helm" / + -- "yaml.helm-values" (not plain "yaml"), so without this, + -- templates/*.yaml only gets yamlls — which flags Helm's Go template + -- syntax ({{ .Values.x }}) as invalid YAML. values.yaml gets the + -- composite filetype instead, which both yamlls and helm_ls match, so + -- it keeps YAML validation *and* gets helm_ls's values-schema support. + vim.filetype.add({ + pattern = { + [".*/templates/.*%.ya?ml"] = "helm", + [".*/templates/.*%.tpl"] = "helm", + [".*/values.*%.ya?ml"] = "yaml.helm-values", + }, + }) + -- Merge blink.cmp's LSP capabilities into every server's default config -- (Mason-managed or not) before any server gets enabled. vim.lsp.config("*", { -- cgit v1.3