[feature] nvim: specify tresitter grammars

Currently we use a lot of tree sitter grammars
This commit is contained in:
Jalil David Salamé Messina 2024-05-04 19:31:50 +02:00
parent 6c375321bc
commit 6be1975d06
Signed by: jalil
GPG key ID: F016B9E770737A0B
2 changed files with 62 additions and 3 deletions

View file

@ -49,7 +49,7 @@ in
# Enable local configuration :h 'exrc' # Enable local configuration :h 'exrc'
exrc = true; # safe since nvim 0.9 exrc = true; # safe since nvim 0.9
}; };
plugins = import ./plugins.nix { inherit lib; }; plugins = import ./plugins.nix { inherit lib pkgs; };
keymaps = import ./mappings.nix; keymaps = import ./mappings.nix;
inherit (import ./augroups.nix) autoGroups autoCmd; inherit (import ./augroups.nix) autoGroups autoCmd;
extraPlugins = extraPlugins =

View file

@ -1,4 +1,4 @@
{ lib }: { lib, pkgs }:
{ {
bacon = { bacon = {
enable = true; enable = true;
@ -196,8 +196,67 @@
enable = true; enable = true;
indent = true; indent = true;
incrementalSelection.enable = true; incrementalSelection.enable = true;
grammarPackages =
let
parsers = pkgs.vimPlugins.nvim-treesitter-parsers;
in
[
parsers.asm
parsers.bash
# parsers.bibtex
parsers.c
parsers.comment
parsers.commonlisp
parsers.cpp
parsers.css
parsers.csv
# parsers.d
parsers.diff
parsers.dockerfile
parsers.dot
parsers.doxygen
parsers.git_config
parsers.git_rebase
parsers.gitattributes
parsers.gitcommit
parsers.gitignore
parsers.go
parsers.gomod
parsers.gosum
parsers.gowork
parsers.html
parsers.ini
parsers.json
parsers.json5
parsers.jsonc
# parsers.latex
parsers.lua
parsers.luadoc
parsers.luap
parsers.luau
parsers.make
parsers.markdown
parsers.markdown_inline
parsers.meson
parsers.nix
parsers.ocaml
parsers.ocaml_interface
parsers.pem
parsers.python
parsers.rust
parsers.scheme
parsers.sql
parsers.ssh_config
parsers.toml
parsers.tsv
parsers.vim
parsers.vimdoc
parsers.wgsl
parsers.wgsl_bevy
parsers.yaml
parsers.zig
];
}; };
treesitter-context.enable = true;
trouble = { trouble = {
enable = true; enable = true;
settings.auto_close = true; settings.auto_close = true;