The original author stopped using helm (which he mostly wrote this package for) on a daily basis, so he didn't really keep up with the development of tree sitter, and nvim-tree-sitter. Some people have been found to keep the repo going, so if you have ideas for improvements feel free to open issues or pull requests.
Golang templates grammar for tree-sitter.
Also includes a helm dialect. The concept of a dialect is that it uses the same parser, but can have different queries (e.g. for different injections). More dialects could be added in the future (e.g. for html templates).
Setup filetype detection:
vim.filetype.add({
extension = {
gotmpl = 'gotmpl',
},
pattern = {
[".*/templates/.*%.tpl"] = "helm",
[".*/templates/.*%.ya?ml"] = "helm",
["helmfile.*%.ya?ml"] = "helm",
},
})
Install nvim-treesitter as described here: nvim-treesitter-install
Install the parser you want to use:
:TSInstall gotmpl
:TSInstall helm
[!NOTE]
If you are using helm, you should also install the yaml parser (:TSInstall yaml) to get language injection for yaml
[!TIP]
If you are using AstroNvim you can just install the astrocommunity helm pack.