mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-04 02:45:53 +00:00
modules/treesitter: switch to explicit lib calls
This commit is contained in:
parent
d3f6446541
commit
81b9a8a95c
4 changed files with 78 additions and 73 deletions
|
|
@ -1,29 +1,26 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkMappingOption mkOption types;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.types) listOf package;
|
||||
in {
|
||||
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;
|
||||
type = listOf package;
|
||||
default = [];
|
||||
description = ''
|
||||
List of treesitter grammars to install. For supported languages
|
||||
use the `vim.language.<lang>.treesitter` option
|
||||
'';
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue