mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-06 10:47:15 +00:00
modules: start breaking down core modules; simplify tree structure
This commit is contained in:
parent
4703ed7731
commit
370913e827
242 changed files with 178 additions and 124 deletions
29
modules/plugins/treesitter/treesitter.nix
Normal file
29
modules/plugins/treesitter/treesitter.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkMappingOption mkOption types;
|
||||
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;
|
||||
default = [];
|
||||
description = ''
|
||||
List of treesitter grammars to install. For supported languages
|
||||
use the `vim.language.<lang>.treesitter` option
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue