From d6f73008cb0fdd0494fc65b278e40992e2df54ce Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 8 Dec 2024 15:10:09 -0800 Subject: [PATCH] feat: nvim-ts-autotag --- nix/neovim-overlay.nix | 1 + nvim/lua/plugins/treesitter/init.lua | 1 + nvim/lua/plugins/treesitter/nvim-ts-autotag.lua | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 nvim/lua/plugins/treesitter/nvim-ts-autotag.lua diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix index 7e8a478..f447be3 100644 --- a/nix/neovim-overlay.nix +++ b/nix/neovim-overlay.nix @@ -58,6 +58,7 @@ with final.pkgs.lib; let # Treesitter nvim-treesitter-textobjects + nvim-ts-autotag (nvim-treesitter.withPlugins ( plugins: with plugins; [ diff --git a/nvim/lua/plugins/treesitter/init.lua b/nvim/lua/plugins/treesitter/init.lua index a6c1344..d87817b 100644 --- a/nvim/lua/plugins/treesitter/init.lua +++ b/nvim/lua/plugins/treesitter/init.lua @@ -3,4 +3,5 @@ local req = MarleyVim.local_require('plugins.treesitter') return { req('nvim-treesitter-textobjects'), req('nvim-treesitter'), + req('nvim-ts-autotag'), } diff --git a/nvim/lua/plugins/treesitter/nvim-ts-autotag.lua b/nvim/lua/plugins/treesitter/nvim-ts-autotag.lua new file mode 100644 index 0000000..d663d8b --- /dev/null +++ b/nvim/lua/plugins/treesitter/nvim-ts-autotag.lua @@ -0,0 +1,11 @@ +return { + 'nvim-ts-autotag', + event = { 'BufReadPost', 'BufWritePost', 'BufNewFile' }, + after = function() + require('nvim-ts-autotag').setup({ + opts = { + enable_close_on_slash = true, + }, + }) + end, +}