2023-02-01 19:11:37 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
2023-03-31 02:20:35 +00:00
|
|
|
with builtins; {
|
2023-02-01 19:11:37 +00:00
|
|
|
options.vim.treesitter = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
2023-04-02 16:58:57 +00:00
|
|
|
description = "Enable tree-sitter [nvim-treesitter]";
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
fold = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
2023-04-02 16:58:57 +00:00
|
|
|
description = "Enable fold with tree-sitter";
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
autotagHtml = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
2023-04-02 16:58:57 +00:00
|
|
|
description = "Enable autoclose and rename html tag [nvim-ts-autotag]";
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
grammars = mkOption {
|
|
|
|
type = with types; listOf package;
|
2023-02-05 22:08:57 +00:00
|
|
|
default = with (pkgs.vimPlugins.nvim-treesitter.builtGrammars);
|
|
|
|
[
|
|
|
|
c
|
|
|
|
cpp
|
|
|
|
nix
|
|
|
|
python
|
|
|
|
rust
|
|
|
|
markdown
|
|
|
|
comment
|
|
|
|
toml
|
|
|
|
make
|
|
|
|
tsx
|
|
|
|
html
|
|
|
|
javascript
|
|
|
|
css
|
|
|
|
graphql
|
|
|
|
json
|
|
|
|
zig
|
|
|
|
]
|
|
|
|
++ (optional config.vim.notes.orgmode.enable org); # add orgmode grammar if enabled
|
2023-02-01 19:11:37 +00:00
|
|
|
description = ''
|
|
|
|
List of treesitter grammars to install.
|
|
|
|
When enabling a language, its treesitter grammar is added for you.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|