plugins/treesitter: support unsetting keymaps

This commit is contained in:
Austin Horstman 2024-07-24 19:55:49 -05:00
parent c12e59ff7c
commit 91130385ed
No known key found for this signature in database
2 changed files with 20 additions and 2 deletions

View file

@ -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";