From 74db7848f31574ff3214730a8812a999e2613547 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Wed, 31 Jan 2024 07:03:16 -0500 Subject: [PATCH] neovim: Only use treesitter highlighting for js/ts Treesitter highlighting seems to be a downgrade in some cases, so I'm okay with disabling it for most files. --- home/neovim.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/neovim.nix b/home/neovim.nix index 39b09acf..a8d159df 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -588,7 +588,11 @@ in require'nvim-treesitter.configs'.setup { highlight = { enable = true, - disable = { "rust" }, + disable = function(lang) + if lang ~= "javascript" and lang ~= "tsx" and lang ~= "typescript" then + return true + end + end, additional_vim_regex_highlighting = true, }, }