1
0
Fork 0
mirror of https://github.com/NotAShelf/neovim-flake.git synced 2024-12-27 13:59:48 +01:00
neovim-flake/modules/treesitter/treesitter.nix

29 lines
958 B
Nix
Raw Normal View History

2023-05-03 00:15:05 +02:00
{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";
2023-05-03 00:15:05 +02: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";
};
};
grammars = mkOption {
type = with types; listOf package;
default = [];
2023-04-17 23:59:23 +02:00
description = nvim.nmd.asciiDoc ''
List of treesitter grammars to install. For supported languages
use the `vim.language.<lang>.treesitter` option
'';
};
};
}