neovim: Fix tree-sitter configuration
This changes the used parsers from an allowlist to a denylist.
This commit is contained in:
parent
95590d6bc3
commit
bf01605517
|
@ -87,7 +87,7 @@ in
|
|||
nvim-jdtls
|
||||
nvim-lspconfig
|
||||
nvim-solarized-lua
|
||||
nvim-treesitter
|
||||
nvim-treesitter.withAllGrammars
|
||||
nvim-web-devicons
|
||||
plantuml-syntax
|
||||
plenary-nvim
|
||||
|
@ -111,29 +111,7 @@ in
|
|||
xdg.configFile = {
|
||||
"nvim/lua/init.lua".source = ./init.lua;
|
||||
"nvim/lua/snippets.lua".source = pkgs.callPackage ./snippets.nix { };
|
||||
} // (lib.mapAttrs'
|
||||
(name: path: lib.nameValuePair "nvim/parser/${lib.removePrefix "tree-sitter-" name}.so" { source = "${path}/parser"; })
|
||||
({
|
||||
inherit (pkgs.tree-sitter.builtGrammars)
|
||||
#tree-sitter-bash
|
||||
tree-sitter-c
|
||||
tree-sitter-cpp
|
||||
tree-sitter-css
|
||||
tree-sitter-dot
|
||||
tree-sitter-go
|
||||
tree-sitter-haskell
|
||||
tree-sitter-html
|
||||
tree-sitter-json
|
||||
#tree-sitter-latex # incompatible with VimTeX
|
||||
tree-sitter-lua
|
||||
tree-sitter-nix
|
||||
tree-sitter-perl
|
||||
tree-sitter-python
|
||||
tree-sitter-rust
|
||||
tree-sitter-scss
|
||||
tree-sitter-toml
|
||||
tree-sitter-yaml;
|
||||
}));
|
||||
};
|
||||
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
}
|
||||
|
|
|
@ -424,6 +424,10 @@ require('nvim-treesitter.configs').setup {
|
|||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
disable = {
|
||||
'gitcommit', -- only for “conventional commits”
|
||||
'latex', -- incompatible with VimTeX
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
|
|
Loading…
Reference in a new issue