neovim: configure oil keymaps
This commit is contained in:
parent
900e9a189f
commit
0c1c74fd6c
1 changed files with 24 additions and 0 deletions
|
@ -104,4 +104,28 @@ in
|
|||
) ++ lib.optionals config.plugin.oil-nvim.enable [
|
||||
{ mode = "n"; lhs = "-"; rhs = cmd "Oil"; }
|
||||
];
|
||||
|
||||
plugin.oil-nvim.setupSettings =
|
||||
let
|
||||
withOpts = action: opts: [ action (nf "opts" opts) ];
|
||||
withMode = mode: action: [ action (nf "mode" mode) ];
|
||||
nMode = withMode "n";
|
||||
in
|
||||
{
|
||||
use_default_keymaps = false;
|
||||
keymaps = {
|
||||
"g?" = nMode "actions.show_help";
|
||||
"-" = nMode "actions.parent";
|
||||
"_" = nMode "actions.open_cwd";
|
||||
"gs" = nMode "actions.change_sort";
|
||||
"gx" = "actions.open_external";
|
||||
"g." = nMode "actions.toggle_hidden";
|
||||
"${lib.mod.CR}" = "actions.select";
|
||||
"${ctrl "t"}" = withOpts "actions.select" { tab = true; };
|
||||
"${ctrl "v"}" = withOpts "actions.select" { vertical = true; };
|
||||
"${ctrl "s"}" = withOpts "actions.select" { horizontal = true; };
|
||||
"${ctrl "p"}" = "actions.preview";
|
||||
"${ctrl "r"}" = "actions.refresh";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue