aboutsummaryrefslogtreecommitdiffstats
path: root/neovim/.config/nvim/lua
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2026-09-25 17:59:19 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2026-09-25 17:59:19 +0200
commitb1690381850f011abad0bb3e94c03e99a9101e98 (patch)
tree3be8bb2d93f55d96912bd451df92881e2f51b464 /neovim/.config/nvim/lua
parentfcbdefe39ef741f8fdcd23cbc537b2e16ccd2490 (diff)
downloaddotfiles-b1690381850f011abad0bb3e94c03e99a9101e98.tar.gz
dotfiles-b1690381850f011abad0bb3e94c03e99a9101e98.tar.bz2
dotfiles-b1690381850f011abad0bb3e94c03e99a9101e98.zip
Added helm stuff
Diffstat (limited to 'neovim/.config/nvim/lua')
-rw-r--r--neovim/.config/nvim/lua/config/project_run.lua12
-rw-r--r--neovim/.config/nvim/lua/plugins/lsp.lua15
-rw-r--r--neovim/.config/nvim/lua/plugins/treesitter.lua1
3 files changed, 25 insertions, 3 deletions
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)
63 63
64 local venv = venv_dir() 64 local venv = venv_dir()
65 local env = venv and venv_env(venv) or nil 65 local env = venv and venv_env(venv) or nil
66 local cmd = opts.module and { "python3", "-m", opts.module } or { "python3", opts.program } 66 -- Resolve the interpreter to the venv's own binary rather than relying on
67 -- env.PATH below: jobstart/libuv resolves a bare "python3" against the
68 -- *parent* process's PATH, not the child job's env, so a PATH override
69 -- alone silently falls through to the system interpreter.
70 local python = venv and (venv .. "/bin/python3") or "python3"
71 local cmd = opts.module and { python, "-m", opts.module } or { python, opts.program }
67 72
68 require("overseer").register_template({ 73 require("overseer").register_template({
69 name = opts.name, 74 name = opts.name,
@@ -90,8 +95,9 @@ function M.python(opts)
90 -- nvim-dap-python only auto-detects an interpreter (VIRTUAL_ENV env var, 95 -- nvim-dap-python only auto-detects an interpreter (VIRTUAL_ENV env var,
91 -- then a venv/.venv/env/.env folder search) when pythonPath/python isn't 96 -- then a venv/.venv/env/.env folder search) when pythonPath/python isn't
92 -- already set - and debugpy needs the literal interpreter path here 97 -- already set - and debugpy needs the literal interpreter path here
93 -- regardless (it spawns it directly, not through a shell that'd resolve 98 -- regardless, same reason `cmd` above uses the venv binary directly
94 -- `python3` via PATH the way env.PATH above does for the overseer task). 99 -- rather than a bare `python3` resolved via env.PATH: it spawns the
100 -- interpreter directly, not through a shell that'd do that resolution.
95 -- Set it explicitly from the same .venv we already found, so debugging 101 -- Set it explicitly from the same .venv we already found, so debugging
96 -- doesn't depend on that separate heuristic agreeing with us - without 102 -- doesn't depend on that separate heuristic agreeing with us - without
97 -- this, a missed/wrong guess falls back to debugpy's own adapter venv, 103 -- 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 {
15 "ts_ls", 15 "ts_ls",
16 "cssls", 16 "cssls",
17 "html", 17 "html",
18 "helm_ls",
18 }, 19 },
19 -- default true: auto-calls vim.lsp.enable() for every Mason-installed 20 -- default true: auto-calls vim.lsp.enable() for every Mason-installed
20 -- server as it finishes installing. 21 -- server as it finishes installing.
21 }, 22 },
22 config = function(_, opts) 23 config = function(_, opts)
24 -- helm_ls's default config only attaches to filetype "helm" /
25 -- "yaml.helm-values" (not plain "yaml"), so without this,
26 -- templates/*.yaml only gets yamlls — which flags Helm's Go template
27 -- syntax ({{ .Values.x }}) as invalid YAML. values.yaml gets the
28 -- composite filetype instead, which both yamlls and helm_ls match, so
29 -- it keeps YAML validation *and* gets helm_ls's values-schema support.
30 vim.filetype.add({
31 pattern = {
32 [".*/templates/.*%.ya?ml"] = "helm",
33 [".*/templates/.*%.tpl"] = "helm",
34 [".*/values.*%.ya?ml"] = "yaml.helm-values",
35 },
36 })
37
23 -- Merge blink.cmp's LSP capabilities into every server's default config 38 -- Merge blink.cmp's LSP capabilities into every server's default config
24 -- (Mason-managed or not) before any server gets enabled. 39 -- (Mason-managed or not) before any server gets enabled.
25 vim.lsp.config("*", { 40 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 {
21 "json", 21 "json",
22 "markdown", 22 "markdown",
23 "markdown_inline", 23 "markdown_inline",
24 "helm",
24 } 25 }
25 26
26 -- The `main` branch shells out to the `tree-sitter` CLI to build every 27 -- The `main` branch shells out to the `tree-sitter` CLI to build every