mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 07:25:30 +00:00
feat: add treesitter keybindings
This commit is contained in:
parent
201a337a0d
commit
320cb8007c
2 changed files with 30 additions and 17 deletions
|
|
@ -1,14 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.treesitter;
|
||||
usingNvimCmp = config.vim.autocomplete.enable && config.vim.autocomplete.type == "nvim-cmp";
|
||||
in {
|
||||
{lib, ...}:
|
||||
with lib; {
|
||||
options.vim.treesitter = {
|
||||
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
||||
|
||||
|
|
@ -16,13 +7,21 @@ in {
|
|||
|
||||
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 = nvim.nmd.asciiDoc ''
|
||||
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