mirror of
https://github.com/akr2002/nv.git
synced 2025-03-12 18:06:15 +00:00
add oil
This commit is contained in:
parent
f3ee9a7345
commit
ebd320651e
2 changed files with 53 additions and 0 deletions
|
@ -64,5 +64,6 @@
|
||||||
./utils/nvim-autopairs.nix
|
./utils/nvim-autopairs.nix
|
||||||
./utils/nvim-colorizer.nix
|
./utils/nvim-colorizer.nix
|
||||||
./utils/nvim-surround.nix
|
./utils/nvim-surround.nix
|
||||||
|
./utils/oil.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
52
config/utils/oil.nix
Normal file
52
config/utils/oil.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
plugins.oil = {
|
||||||
|
enable = true;
|
||||||
|
useDefaultKeymaps = true;
|
||||||
|
deleteToTrash = true;
|
||||||
|
viewOptions = {
|
||||||
|
showHidden = true;
|
||||||
|
};
|
||||||
|
float = {
|
||||||
|
padding = 2;
|
||||||
|
maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)'';
|
||||||
|
maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)'';
|
||||||
|
border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||||
|
winOptions = {
|
||||||
|
winblend = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
preview = {
|
||||||
|
border = "rounded";
|
||||||
|
};
|
||||||
|
keymaps = {
|
||||||
|
"g?" = "actions.show_help";
|
||||||
|
"<CR>" = "actions.select";
|
||||||
|
"<C-\\>" = "actions.select_vsplit";
|
||||||
|
"<C-enter>" = "actions.select_split"; # this is used to navigate left
|
||||||
|
"<C-t>" = "actions.select_tab";
|
||||||
|
"<C-p>" = "actions.preview";
|
||||||
|
"<C-c>" = "actions.close";
|
||||||
|
"<C-r>" = "actions.refresh";
|
||||||
|
"-" = "actions.parent";
|
||||||
|
"_" = "actions.open_cwd";
|
||||||
|
"`" = "actions.cd";
|
||||||
|
"~" = "actions.tcd";
|
||||||
|
"gs" = "actions.change_sort";
|
||||||
|
"gx" = "actions.open_external";
|
||||||
|
"g." = "actions.toggle_hidden";
|
||||||
|
"q" = "actions.close";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>o";
|
||||||
|
action = ":Oil --float<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Open parent directory";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue