diff --git a/plugins/default.nix b/plugins/default.nix index 650b1ce..3c02465 100644 --- a/plugins/default.nix +++ b/plugins/default.nix @@ -21,6 +21,7 @@ ./luasnip.nix ./nvim-tree.nix ./telescope.nix + ./treesitter.nix ./vim-signify.nix ]; @@ -66,7 +67,6 @@ sleuth.enable = true; startify.enable = config.nixvim-config.enable-startify; tmux-navigator.enable = true; - treesitter.enable = true; treesitter-context.enable = true; trouble.enable = true; ts-autotag.enable = true; diff --git a/plugins/treesitter.nix b/plugins/treesitter.nix new file mode 100644 index 0000000..22510a2 --- /dev/null +++ b/plugins/treesitter.nix @@ -0,0 +1,37 @@ +{ ... }: +{ + programs.nixvim = { + plugins.treesitter = { + enable = true; + + settings = { + auto_install = true; + folding = true; + highlight = { + enable = true; + ## Can slow down the editor + # additional_vim_regex_highlighting = true; + custom_captures = { }; + disable = [ + # "rust" + ]; + }; + ignore_install = [ + # "rust" + ]; + incremental_selection = { + enable = true; + keymaps = { + init_selection = false; + node_decremental = "grm"; + node_incremental = "grn"; + scope_incremental = "grc"; + }; + }; + indent = { + enable = true; + }; + }; + }; + }; +}