plugins/oil.nvim: Update add a few missing options (#1152)

This commit is contained in:
Haseeb Majid 2024-02-27 12:50:45 +00:00 committed by GitHub
parent 63558cff59
commit 8b013707cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View file

@ -264,6 +264,21 @@ in {
helpers.defaultNullOpts.mkBool true helpers.defaultNullOpts.mkBool true
"Selecting a new/moved/renamed file or directory will prompt you to save changes first."; "Selecting a new/moved/renamed file or directory will prompt you to save changes first.";
cleanupDelayMs =
helpers.defaultNullOpts.mkNullable
(types.either types.int (types.enum [false]))
"2000" ''
Oil will automatically delete hidden buffers after this delay.
You can set the delay to false to disable cleanup entirely.
Note that the cleanup process only starts when none of the oil buffers are currently displayed
'';
lspRenameAutosave =
helpers.defaultNullOpts.mkNullable
(types.either types.bool (types.enum ["unmodified"]))
"false"
"Set to true to autosave buffers that are updated with LSP willRenameFiles. Set to \"unmodified\" to only save unmodified buffers";
keymaps = keymaps =
helpers.defaultNullOpts.mkNullable helpers.defaultNullOpts.mkNullable
types.attrs types.attrs
@ -377,6 +392,8 @@ in {
delete_to_trash = cfg.deleteToTrash; delete_to_trash = cfg.deleteToTrash;
trash_command = cfg.trashCommand; trash_command = cfg.trashCommand;
prompt_save_on_select_new_entry = cfg.promptSaveOnSelectNewEntry; prompt_save_on_select_new_entry = cfg.promptSaveOnSelectNewEntry;
lsp_rename_autosave = cfg.lspRenameAutosave;
cleanup_delay_ms = cfg.cleanupDelayMs;
inherit (cfg) keymaps; inherit (cfg) keymaps;
use_default_keymaps = cfg.useDefaultKeymaps; use_default_keymaps = cfg.useDefaultKeymaps;
view_options = with cfg.viewOptions; { view_options = with cfg.viewOptions; {

View file

@ -68,6 +68,8 @@
deleteToTrash = false; deleteToTrash = false;
trashCommand = "trash-put"; trashCommand = "trash-put";
promptSaveOnSelectNewEntry = true; promptSaveOnSelectNewEntry = true;
lspRenameAutosave = true;
cleanupDelayMs = 500;
keymaps = { keymaps = {
"g?" = "actions.show_help"; "g?" = "actions.show_help";
"<CR>" = "actions.select"; "<CR>" = "actions.select";