diff options
feat: add `treesitter`
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | lua/config/plugins/treesitter.lua | 17 |
2 files changed, 17 insertions, 1 deletions
@@ -128,6 +128,7 @@ general = with pkgs.vimPlugins; { leap = [ leap-nvim flit-nvim ]; telescope = [ telescope-nvim ]; + treesitter = [ nvim-treesitter.withAllGrammars nvim-treesitter-textobjects ]; extra = [ which-key-nvim ]; }; }; diff --git a/lua/config/plugins/treesitter.lua b/lua/config/plugins/treesitter.lua index a564707..8e3df6a 100644 --- a/lua/config/plugins/treesitter.lua +++ b/lua/config/plugins/treesitter.lua @@ -1 +1,16 @@ -return {} +return { + { + "nvim-treesitter", + event = "DeferredUIEnter", + load = function(name) + vim.cmd.packadd(name) + vim.cmd.packadd("nvim-treesitter-textobjects") + end, + after = function(_) + require("nvim-treesitter.configs").setup({ + highlight = { enable = true }, + indent = { enable = true }, + }) + end, + }, +} |