From 1adf2a5f922742b5fc71a3c308f67a7cb2d6d7eb Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 8 Aug 2024 20:06:48 +0200 Subject: nvim: Add treesitter support for go templates --- .config/nvim/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.config/nvim/init.lua') diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 8359d47..eae8bb9 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -171,6 +171,7 @@ require 'paq' { 'luckasRanarison/tree-sitter-hypr', 'mattn/emmet-vim', 'neovim/nvim-lspconfig', + 'ngalaiko/tree-sitter-go-template', 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope-ui-select.nvim', @@ -270,6 +271,13 @@ treeconfs.gsp = { }, filetype = 'gsp', } +treeconfs.gotmpl = { + install_info = { + url = 'https://github.com/ngalaiko/tree-sitter-go-template', + files = { 'src/parser.c' }, + }, + filetype = 'gotmpl', +} require('nvim-treesitter.install').prefer_git = true require('nvim-treesitter.configs').setup { -- cgit v1.2.3