[TS] Add support for helm chart highlighting

This commit is contained in:
2026-03-10 11:45:39 +01:00
parent a5644e8645
commit bc8830555e
2 changed files with 62 additions and 54 deletions

View File

@@ -1,8 +1,14 @@
vim.filetype.add({ vim.filetype.add({
extension = {
gotmpl = "gotmpl",
},
pattern = { pattern = {
["compose.*%.ya?ml"] = "yaml.docker-compose", ["compose.*%.ya?ml"] = "yaml.docker-compose",
["docker%-compose.*%.ya?ml"] = "yaml.docker-compose", ["docker%-compose.*%.ya?ml"] = "yaml.docker-compose",
[".*/.gitea/workflows/.*%.ya?ml"] = "yaml.actions", [".*/.gitea/workflows/.*%.ya?ml"] = "yaml.actions",
[".*/.github/workflows/.*%.ya?ml"] = "yaml.actions", [".*/.github/workflows/.*%.ya?ml"] = "yaml.actions",
[".*/templates/.*%.tpl"] = "helm",
[".*/templates/.*%.ya?ml"] = "helm",
["helmfile.*%.ya?ml"] = "helm",
}, },
}) })

View File

@@ -1,57 +1,59 @@
return { return {
-- syntax highlighting -- syntax highlighting
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
branch = "master", branch = "master",
event = { "BufRead", "BufNewFile" }, event = { "BufRead", "BufNewFile" },
build = ":TSUpdate", build = ":TSUpdate",
config = function() config = function()
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
ensure_installed = { ensure_installed = {
"asm", "asm",
"bash", "bash",
"c", "c",
"cpp", "cpp",
"css", "css",
"haskell", "gotmpl",
"html", "haskell",
"hyprlang", "helm",
"java", "html",
"javadoc", "hyprlang",
"javascript", "java",
"jsdoc", "javadoc",
"json", "javascript",
"jsonc", "jsdoc",
-- "latex", "json",
"lua", "jsonc",
"markdown", -- "latex",
"meson", "lua",
"nginx", "markdown",
"php", "meson",
"python", "nginx",
"rasi", "php",
"requirements", "python",
"robots", "rasi",
"ruby", "requirements",
"rust", "robots",
"scss", "ruby",
"sql", "rust",
"svelte", "scss",
"swift", "sql",
"toml", "svelte",
"typescript", "swift",
"tsx", "toml",
"verilog", "typescript",
"vue", "tsx",
"xml", "verilog",
"yaml", "vue",
"zathurarc", "xml",
}, "yaml",
sync_install = false, "zathurarc",
},
sync_install = false,
highlight = { highlight = {
enable = true, enable = true,
disable = { "tex" }, disable = { "tex" },
}, },
}) })
end, end,
} }