fastaction-nvim: move range_code_action to visual maps

This commit is contained in:
NotAShelf 2024-07-20 17:24:00 +03:00
parent 16f781e627
commit cd1eb78f02
No known key found for this signature in database
GPG key ID: AF26552424E53993

View file

@ -3,10 +3,10 @@
lib,
...
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetLuaBinding;
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetLuaBinding pushDownDefault;
cfg = config.vim.lsp.code-actions;
self = import ./fastaction-nvim.nix {inherit lib;};
@ -18,11 +18,13 @@ in {
vim = {
startPlugins = ["fastaction-nvim"];
binds.whichKey.register = pushDownDefault {
"<leader>c" = "Code Actions";
};
maps = {
normal = mkMerge [
(mkSetLuaBinding mappings.code_action "require('fastaction').code_action")
(mkSetLuaBinding mappings.range_action "require('fastaction').range_code_action")
];
normal = mkSetLuaBinding mappings.code_action "require('fastaction').code_action";
visual = mkSetLuaBinding mappings.range_action "require('fastaction').range_code_action";
};
pluginRC.fastaction-nvim = entryAnywhere ''