From 57cf5d561b6c75d6ee9379b4df56797ec55b5996 Mon Sep 17 00:00:00 2001 From: workflow <4farlion@gmail.com> Date: Sun, 17 Dec 2023 13:42:56 +0000 Subject: [PATCH] feat(nvim): treesitter go brrrrrrrrrrrrrrrrrrrrr --- home/neovim.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/home/neovim.nix b/home/neovim.nix index 1e425e20..7928c710 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -682,8 +682,24 @@ in type = "lua"; } { - plugin = nvim-treesitter; + plugin = nvim-treesitter.withAllGrammars; config = '' + -- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}' + vim.defer_fn(function() + require('nvim-treesitter.configs').setup { + auto_install = false, + highlight = { enable = true }, + indent = { enable = true }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = '', + node_incremental = '', + node_decremental = '', + }, + }, + } + end, 0) ''; type = "lua"; }