diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua new file mode 100644 index 0000000..2a071b6 --- /dev/null +++ b/after/plugin/treesitter.lua @@ -0,0 +1,10 @@ +local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +---@diagnostic disable-next-line: inject-field +parser_config.gotmpl = { + install_info = { + url = "https://github.com/ngalaiko/tree-sitter-go-template", + files = { "src/parser.c" }, + }, + filetype = "gotmpl", + used_by = { "gohtmltmpl", "gotexttmpl", "gotmpl", "yaml" }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 81f2a90..f6a7fcc 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -36,6 +36,7 @@ return { "gitattributes", "gitcommit", "gitignore", + "gotmpl", "hjson", "htmldjango", "http",