summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix1
-rw-r--r--lua/config/plugins/treesitter.lua17
2 files changed, 17 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 679cedd..c5ec6cd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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,
+ },
+}