diff options
| author | Sergii Tykhomyrov <sergii@tykhomyrov.net> | 2026-08-03 21:33:13 +0200 |
|---|---|---|
| committer | Sergii Tykhomyrov <sergii@tykhomyrov.net> | 2026-08-03 21:33:13 +0200 |
| commit | 634ec6a09ce5744252a6d89291f747c0b490d6e1 (patch) | |
| tree | 91a385b1171b6fb9d3aaa8cdb37254cfa38acca8 /nvim/dot-config | |
| parent | 29b4e6c2bca441d5071b47b36f9a66a88964d880 (diff) | |
| download | dotfiles-634ec6a09ce5744252a6d89291f747c0b490d6e1.tar.gz dotfiles-634ec6a09ce5744252a6d89291f747c0b490d6e1.zip | |
Add syntax highlighting for Go HTML templates
Map gohtml/gotmpl extensions to the gotmpl filetype and install
the gotmpl and html treesitter parsers.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYrzpJevCUUqP6pFyJHmB4
Diffstat (limited to 'nvim/dot-config')
| -rw-r--r-- | nvim/dot-config/nvim/init.lua | 8 | ||||
| -rw-r--r-- | nvim/dot-config/nvim/lua/plugins/treesitter.lua | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/nvim/dot-config/nvim/init.lua b/nvim/dot-config/nvim/init.lua index f621504..94498b8 100644 --- a/nvim/dot-config/nvim/init.lua +++ b/nvim/dot-config/nvim/init.lua @@ -65,6 +65,14 @@ vim.api.nvim_create_autocmd("BufWritePre", { end, }) +-- Go HTML templates: use the treesitter gotmpl parser +vim.filetype.add({ + extension = { + gohtml = "gotmpl", + gotmpl = "gotmpl", + }, +}) + -- Spell checking for markdown and git commit messages vim.api.nvim_create_autocmd("FileType", { pattern = { "markdown", "gitcommit" }, diff --git a/nvim/dot-config/nvim/lua/plugins/treesitter.lua b/nvim/dot-config/nvim/lua/plugins/treesitter.lua index 9692f57..9809d84 100644 --- a/nvim/dot-config/nvim/lua/plugins/treesitter.lua +++ b/nvim/dot-config/nvim/lua/plugins/treesitter.lua @@ -5,7 +5,7 @@ return { config = function() require("nvim-treesitter.configs").setup({ ensure_installed = { - "python", "go", "gomod", "gosum", + "python", "go", "gomod", "gosum", "gotmpl", "html", "lua", "vim", "vimdoc", "markdown", "markdown_inline", "yaml", }, |
