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/README.md | 2 +- neovim/.config/nvim/lua/config/project_run.lua | 12 +++++++++--- neovim/.config/nvim/lua/plugins/lsp.lua | 15 +++++++++++++++ neovim/.config/nvim/lua/plugins/treesitter.lua | 1 + 4 files changed, 26 insertions(+), 4 deletions(-) (limited to 'neovim/.config') diff --git a/neovim/.config/nvim/README.md b/neovim/.config/nvim/README.md index 7a54caa..c86acaa 100644 --- a/neovim/.config/nvim/README.md +++ b/neovim/.config/nvim/README.md @@ -58,7 +58,7 @@ such tables) and it's included on next launch. Managed by Mason, auto-installed via `lua/plugins/lsp.lua`'s `ensure_installed`: `pyright`, `lua_ls`, `bashls`, `terraformls`, `yamlls`, -`ts_ls`, `cssls`, `html`. `clangd` is enabled separately (not +`ts_ls`, `cssls`, `html`, `helm_ls`. `clangd` is enabled separately (not Mason-installed) since it already ships with Xcode Command Line Tools. Refactoring/navigation (rename, code actions, references, go-to-definition, diff --git a/neovim/.config/nvim/lua/config/project_run.lua b/neovim/.config/nvim/lua/config/project_run.lua index 40c1795..b7c2560 100644 --- a/neovim/.config/nvim/lua/config/project_run.lua +++ b/neovim/.config/nvim/lua/config/project_run.lua @@ -63,7 +63,12 @@ function M.python(opts) local venv = venv_dir() local env = venv and venv_env(venv) or nil - local cmd = opts.module and { "python3", "-m", opts.module } or { "python3", opts.program } + -- Resolve the interpreter to the venv's own binary rather than relying on + -- env.PATH below: jobstart/libuv resolves a bare "python3" against the + -- *parent* process's PATH, not the child job's env, so a PATH override + -- alone silently falls through to the system interpreter. + local python = venv and (venv .. "/bin/python3") or "python3" + local cmd = opts.module and { python, "-m", opts.module } or { python, opts.program } require("overseer").register_template({ name = opts.name, @@ -90,8 +95,9 @@ function M.python(opts) -- nvim-dap-python only auto-detects an interpreter (VIRTUAL_ENV env var, -- then a venv/.venv/env/.env folder search) when pythonPath/python isn't -- already set - and debugpy needs the literal interpreter path here - -- regardless (it spawns it directly, not through a shell that'd resolve - -- `python3` via PATH the way env.PATH above does for the overseer task). + -- regardless, same reason `cmd` above uses the venv binary directly + -- rather than a bare `python3` resolved via env.PATH: it spawns the + -- interpreter directly, not through a shell that'd do that resolution. -- Set it explicitly from the same .venv we already found, so debugging -- doesn't depend on that separate heuristic agreeing with us - without -- this, a missed/wrong guess falls back to debugpy's own adapter venv, 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("*", { diff --git a/neovim/.config/nvim/lua/plugins/treesitter.lua b/neovim/.config/nvim/lua/plugins/treesitter.lua index 37320d4..b26c039 100644 --- a/neovim/.config/nvim/lua/plugins/treesitter.lua +++ b/neovim/.config/nvim/lua/plugins/treesitter.lua @@ -21,6 +21,7 @@ return { "json", "markdown", "markdown_inline", + "helm", } -- The `main` branch shells out to the `tree-sitter` CLI to build every -- cgit v1.3