From 01d7ead1210697ad03a06596f08f1fad29246c56 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 26 Feb 2022 12:26:49 +0100 Subject: [PATCH] home: vim: add 'nvim-treesitter' IMHO, this is *very* colorful, I might not end up using the highlighting after all. Let's see if I get used to it after a little while. --- home/vim/default.nix | 1 + home/vim/plugin/settings/tree-sitter.vim | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 home/vim/plugin/settings/tree-sitter.vim diff --git a/home/vim/default.nix b/home/vim/default.nix index 574b01e..9ef28a0 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -66,6 +66,7 @@ in lightline-lsp lsp_lines-nvim # Show diagnostics *over* regions null-ls-nvim # LSP integration for linters and formatters + (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting plenary-nvim # 'null-ls' dependency ]; diff --git a/home/vim/plugin/settings/tree-sitter.vim b/home/vim/plugin/settings/tree-sitter.vim new file mode 100644 index 0000000..8df22b0 --- /dev/null +++ b/home/vim/plugin/settings/tree-sitter.vim @@ -0,0 +1,13 @@ +lua << EOF +local ts_config = require("nvim-treesitter.configs") +ts_config.setup({ + highlight = { + enable = true, + -- Avoid duplicate highlighting + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true, + }, +}) +EOF