nvf/modules/treesitter/treesitter.nix
NotAShelf 3de5f1ba39
docs: use nixosOptionDocs
NixOS 23.11 is deprecating DocBook option documentation. Following home-manager in this change is probably a good idea
2023-11-04 14:30:04 +03:00

29 lines
940 B
Nix

{lib, ...}:
with lib; {
options.vim.treesitter = {
enable = mkEnableOption "treesitter, also enabled automatically through language options";
fold = mkEnableOption "fold with treesitter";
autotagHtml = mkEnableOption "autoclose and rename html tag";
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";
};
};
grammars = mkOption {
type = with types; listOf package;
default = [];
description = ''
List of treesitter grammars to install. For supported languages
use the `vim.language.<lang>.treesitter` option
'';
};
};
}