mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 11:55:22 +00:00
neovim/queries: init and add an example injection
This commit is contained in:
parent
d9ba7f0a9e
commit
6fe9ecd995
6 changed files with 181 additions and 4 deletions
|
|
@ -4,7 +4,25 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) listOf nullOr package bool str oneOf;
|
||||
inherit (lib.types) listOf nullOr package bool str lines enum submodule oneOf;
|
||||
|
||||
queriesType = submodule {
|
||||
options = {
|
||||
type = mkOption {
|
||||
type = enum ["injections" "highlights" "folds" "locals" "indents"];
|
||||
description = "The kind of query to register.";
|
||||
};
|
||||
filetypes = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "The filetypes for which the query should be registered.";
|
||||
};
|
||||
content = mkOption {
|
||||
type = lines;
|
||||
description = "The queries scm script.";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.treesitter = {
|
||||
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
||||
|
|
@ -87,5 +105,11 @@ in {
|
|||
};
|
||||
|
||||
highlight = {enable = mkEnableOption "highlighting with treesitter" // {default = true;};};
|
||||
|
||||
queries = mkOption {
|
||||
type = listOf queriesType;
|
||||
default = [];
|
||||
description = "A list of Neovim treesitter queries to be registered.";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue