From bc8830555e0be1cae4bb38576008d81dfe02faab Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Tue, 10 Mar 2026 11:45:39 +0100 Subject: [PATCH] [TS] Add support for helm chart highlighting --- nvim/lua/filetypes.lua | 6 ++ nvim/lua/plugins/util/treesitter.lua | 110 ++++++++++++++------------- 2 files changed, 62 insertions(+), 54 deletions(-) diff --git a/nvim/lua/filetypes.lua b/nvim/lua/filetypes.lua index e8f28e1..44ce62b 100644 --- a/nvim/lua/filetypes.lua +++ b/nvim/lua/filetypes.lua @@ -1,8 +1,14 @@ vim.filetype.add({ + extension = { + gotmpl = "gotmpl", + }, pattern = { ["compose.*%.ya?ml"] = "yaml.docker-compose", ["docker%-compose.*%.ya?ml"] = "yaml.docker-compose", [".*/.gitea/workflows/.*%.ya?ml"] = "yaml.actions", [".*/.github/workflows/.*%.ya?ml"] = "yaml.actions", + [".*/templates/.*%.tpl"] = "helm", + [".*/templates/.*%.ya?ml"] = "helm", + ["helmfile.*%.ya?ml"] = "helm", }, }) diff --git a/nvim/lua/plugins/util/treesitter.lua b/nvim/lua/plugins/util/treesitter.lua index f9cc974..de71a4c 100755 --- a/nvim/lua/plugins/util/treesitter.lua +++ b/nvim/lua/plugins/util/treesitter.lua @@ -1,57 +1,59 @@ return { - -- syntax highlighting - "nvim-treesitter/nvim-treesitter", - branch = "master", - event = { "BufRead", "BufNewFile" }, - build = ":TSUpdate", - config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = { - "asm", - "bash", - "c", - "cpp", - "css", - "haskell", - "html", - "hyprlang", - "java", - "javadoc", - "javascript", - "jsdoc", - "json", - "jsonc", - -- "latex", - "lua", - "markdown", - "meson", - "nginx", - "php", - "python", - "rasi", - "requirements", - "robots", - "ruby", - "rust", - "scss", - "sql", - "svelte", - "swift", - "toml", - "typescript", - "tsx", - "verilog", - "vue", - "xml", - "yaml", - "zathurarc", - }, - sync_install = false, + -- syntax highlighting + "nvim-treesitter/nvim-treesitter", + branch = "master", + event = { "BufRead", "BufNewFile" }, + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "asm", + "bash", + "c", + "cpp", + "css", + "gotmpl", + "haskell", + "helm", + "html", + "hyprlang", + "java", + "javadoc", + "javascript", + "jsdoc", + "json", + "jsonc", + -- "latex", + "lua", + "markdown", + "meson", + "nginx", + "php", + "python", + "rasi", + "requirements", + "robots", + "ruby", + "rust", + "scss", + "sql", + "svelte", + "swift", + "toml", + "typescript", + "tsx", + "verilog", + "vue", + "xml", + "yaml", + "zathurarc", + }, + sync_install = false, - highlight = { - enable = true, - disable = { "tex" }, - }, - }) - end, + highlight = { + enable = true, + disable = { "tex" }, + }, + }) + end, }