2023-05-02 22:15:05 +00:00
|
|
|
{lib, ...}:
|
|
|
|
with lib; {
|
2023-02-01 19:11:37 +00:00
|
|
|
options.vim.treesitter = {
|
2023-04-17 20:27:27 +00:00
|
|
|
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
2023-02-01 19:11:37 +00:00
|
|
|
|
2023-04-17 20:27:27 +00:00
|
|
|
fold = mkEnableOption "fold with treesitter";
|
2023-02-01 19:11:37 +00:00
|
|
|
|
2023-04-17 20:27:27 +00:00
|
|
|
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
2023-02-01 19:11:37 +00:00
|
|
|
|
2023-05-02 22:15:05 +00:00
|
|
|
mappings = {
|
|
|
|
incrementalSelection = {
|
|
|
|
init = mkMappingOption "Init selection [treesitter]" "gnn";
|
|
|
|
incrementByNode = mkMappingOption "Increment selection by node [treesitter]" "grn";
|
|
|
|
incrementByScope = mkMappingOption "Increment selection by scope [treesitter]" "grc";
|
|
|
|
decrementByNode = mkMappingOption "Decrement selection by node [treesitter]" "grm";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
grammars = mkOption {
|
|
|
|
type = with types; listOf package;
|
2023-04-17 20:27:27 +00:00
|
|
|
default = [];
|
2023-11-04 11:30:04 +00:00
|
|
|
description = ''
|
2023-04-17 20:27:27 +00:00
|
|
|
List of treesitter grammars to install. For supported languages
|
|
|
|
use the `vim.language.<lang>.treesitter` option
|
2023-02-01 19:11:37 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|