From 49cc04114e50d2a92d25c2dda038d00f6e9d67c2 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 12 Jan 2024 04:26:01 -0500 Subject: [PATCH] neovim: Enable treesitter highlighting This works, however some of the syntax highlighting with treesitter feels worse compared to the default syntax highlighting, so it may be more useful to keep it disabled. --- home/neovim.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/home/neovim.nix b/home/neovim.nix index ae0ca228..a6f02e55 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -603,6 +603,19 @@ in } ''; } + { + plugin = nvim-treesitter.withAllGrammars; + type = "lua"; + config = /* lua */ '' + require'nvim-treesitter.configs'.setup { + highlight = { + enable = true, + disable = { "rust" }, + additional_vim_regex_highlighting = true, + }, + } + ''; + } cosco-vim fzf-vim vim-caddyfile @@ -626,7 +639,6 @@ in vim-svelte typst-vim emmet-vim - nvim-treesitter.withAllGrammars tagbar yats-vim ];