plugins/treesitter: re-organize treesitter plugins

This commit is contained in:
Gaetan Lepage 2023-04-06 15:10:08 +02:00 committed by Gaétan Lepage
parent f79dccdc2e
commit ff791d20c8
7 changed files with 12 additions and 8 deletions

View file

@ -0,0 +1,29 @@
{pkgs}: {
empty = {
plugins.treesitter.enable = true;
plugins.treesitter-playground.enable = true;
};
default = {
plugins.treesitter.enable = true;
plugins.treesitter-playground = {
enable = true;
disabledLanguages = [];
updateTime = 25;
persistQueries = false;
keybindings = {
toggleQueryEditor = "o";
toggleHlGroups = "i";
toggleInjectedLanguages = "t";
toggleAnonymousNodes = "a";
toggleLanguageDisplay = "I";
focusLanguage = "f";
unfocusLanguage = "F";
update = "R";
gotoNode = "<cr>";
showHelp = "?";
};
};
};
}

View file

@ -0,0 +1,29 @@
{pkgs}: {
empty = {
plugins.treesitter.enable = true;
};
nonix = {
# TODO: See if we can build parsers (legacy way)
tests.dontRun = true;
plugins.treesitter = {
enable = true;
nixGrammars = false;
};
};
# This needs a custom input
# custom = {
# plugins.treesitter = {
# enable = true;
# nixGrammars = true;
# grammarPackages = [
# (build-ts.lib.buildGrammar pkgs {
# language = "gleam";
# version = "0.25.0";
# source = gleam;
# })
# ];
# };
# };
}