mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
plugins/treesitter: support unsetting keymaps
This commit is contained in:
parent
c12e59ff7c
commit
91130385ed
2 changed files with 20 additions and 2 deletions
|
@ -118,7 +118,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
|
||||
keymaps =
|
||||
let
|
||||
mkKeymap = default: helpers.defaultNullOpts.mkStr default "Key shortcut";
|
||||
mkKeymap =
|
||||
default:
|
||||
helpers.defaultNullOpts.mkNullableWithRaw (
|
||||
with types; either str bool
|
||||
) default "Key shortcut or false to unset.";
|
||||
in
|
||||
{
|
||||
init_selection = mkKeymap "gnn";
|
||||
|
@ -190,7 +194,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
init_selection = "gnn";
|
||||
init_selection = false;
|
||||
node_decremental = "grm";
|
||||
node_incremental = "grn";
|
||||
scope_incremental = "grc";
|
||||
|
|
|
@ -120,4 +120,18 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
disable-init-selection = {
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
incremental_selection = {
|
||||
enable = true;
|
||||
|
||||
keymaps.init_selection = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue