From 0791d5bd9217fffbdb7c97f6b71cf109407e7a3c Mon Sep 17 00:00:00 2001 From: Ellis Rahhal Date: Tue, 18 Feb 2025 22:07:17 -0800 Subject: [PATCH] treesitter configured --- plugins/default.nix | 2 +- plugins/treesitter.nix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 plugins/treesitter.nix 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; + }; + }; + }; + }; +}