plugins/oil: switch to mkNeovimPlugin + update options

This commit is contained in:
Gaetan Lepage 2024-03-18 10:28:44 +01:00 committed by Gaétan Lepage
parent d1d7fb1f4a
commit b8b0c1d58f
2 changed files with 556 additions and 472 deletions

View file

@ -3,134 +3,186 @@
plugins.oil.enable = true;
};
short-example = {
plugins.oil = {
enable = true;
settings = {
columns = ["icon"];
view_options.show_hidden = false;
win_options = {
wrap = false;
signcolumn = "no";
cursorcolumn = false;
foldcolumn = "0";
spell = false;
list = false;
conceallevel = 3;
concealcursor = "ncv";
};
keymaps = {
"<C-c>" = false;
"<leader>qq" = "actions.close";
"<C-l>" = false;
"<C-r>" = "actions.refresh";
"y." = "actions.copy_entry_path";
};
skip_confirm_for_simple_edits = true;
};
};
};
example = {
plugins.oil = {
enable = true;
columns = {
type = {
enable = true;
highlight = "Foo";
icons = {};
settings = {
default_file_explorer = true;
columns = [
{
__unkeyed = "type";
highlight = "Foo";
icons = {};
}
{
__unkeyed = "icon";
highlight = "Foo";
defaultFile = "bar";
directory = "dir";
}
{
__unkeyed = "size";
highlight = "Foo";
}
{
__unkeyed = "permissions";
highlight = "Foo";
}
{
__unkeyed = "ctime";
highlight = "Foo";
format = "format";
}
{
__unkeyed = "mtime";
highlight = "Foo";
format = "format";
}
{
__unkeyed = "atime";
highlight = "Foo";
format = "format";
}
{
__unkeyed = "birthtime";
highlight = "Foo";
format = "format";
}
];
buf_options = {
buflisted = false;
bufhidden = "hide";
};
icon = {
enable = true;
highlight = "Foo";
defaultFile = "bar";
directory = "dir";
win_options = {
wrap = false;
signcolumn = "no";
cursorcolumn = false;
foldcolumn = "0";
spell = false;
list = false;
conceallevel = 3;
concealcursor = "nvic";
};
size = {
enable = true;
highlight = "Foo";
delete_to_trash = false;
skip_confirm_for_simple_edits = false;
prompt_save_on_select_new_entry = true;
cleanup_delay_ms = 2000;
lsp_file_method = {
timeout_ms = 1000;
autosave_changes = true;
};
permissions = {
enable = true;
highlight = "Foo";
constrain_cursor = "editable";
experimental_watch_for_changes = false;
keymaps = {
"g?" = "actions.show_help";
"<CR>" = "actions.select";
"<C-s>" = "actions.select_vsplit";
"<C-h>" = "actions.select_split";
"<C-t>" = "actions.select_tab";
"<C-p>" = "actions.preview";
"<C-c>" = "actions.close";
"<C-l>" = "actions.refresh";
"-" = "actions.parent";
"_" = "actions.open_cwd";
"`" = "actions.cd";
"~" = "actions.tcd";
"g." = "actions.toggle_hidden";
};
ctime = {
enable = true;
highlight = "Foo";
format = "format";
keymaps_help = {
border = "rounded";
};
mtime = {
enable = true;
highlight = "Foo";
format = "format";
use_default_keymaps = true;
view_options = {
show_hidden = false;
is_hidden_file = ''
function(name, bufnr)
return vim.startswith(name, ".")
end
'';
is_always_hidden = ''
function(name, bufnr)
return false
end
'';
natural_order = true;
sort = [
["type" "asc"]
["name" "asc"]
];
};
atime = {
enable = true;
highlight = "Foo";
format = "format";
float = {
padding = 2;
max_width = 0;
max_height = 0;
border = "rounded";
win_options = {
winblend = 0;
};
override = ''
function(conf)
return conf
end
'';
};
birthtime = {
enable = true;
highlight = "Foo";
format = "format";
preview = {
max_width = 0.9;
min_width = [40 0.4];
width = null;
max_height = 0.9;
min_height = [5 0.1];
height = null;
border = "rounded";
win_options = {
winblend = 0;
};
update_on_cursor_moved = true;
};
};
bufOptions = {
buflisted = false;
bufhidden = "hide";
};
winOptions = {
wrap = false;
signcolumn = "no";
cursorcolumn = false;
foldcolumn = "0";
spell = false;
list = false;
conceallevel = 3;
concealcursor = "n";
};
defaultFileExplorer = true;
restoreWinOptions = true;
skipConfirmForSimpleEdits = false;
deleteToTrash = false;
trashCommand = "trash-put";
promptSaveOnSelectNewEntry = true;
lspRenameAutosave = true;
cleanupDelayMs = 500;
keymaps = {
"g?" = "actions.show_help";
"<CR>" = "actions.select";
"<C-s>" = "actions.select_vsplit";
"<C-h>" = "actions.select_split";
"<C-t>" = "actions.select_tab";
"<C-p>" = "actions.preview";
"<C-c>" = "actions.close";
"<C-l>" = "actions.refresh";
"-" = "actions.parent";
"_" = "actions.open_cwd";
"`" = "actions.cd";
"~" = "actions.tcd";
"g." = "actions.toggle_hidden";
};
useDefaultKeymaps = true;
viewOptions = {
showHidden = false;
isHiddenFile = ''
function(name, bufnr)
return vim.startswith(name, ".")
end
'';
isAlwaysHidden = ''
function(name, bufnr)
return false
end
'';
};
float = {
padding = 2;
maxWidth = 0;
maxHeight = 0;
border = "rounded";
winOptions = {
winblend = 10;
progress = {
max_width = 0.9;
min_width = [40 0.4];
width = null;
max_height = 0.9;
min_height = [5 0.1];
height = null;
border = "rounded";
minimized_border = "none";
win_options = {
winblend = 0;
};
};
};
preview = {
maxWidth = 0.9;
minWidth = [40 0.4];
width = null;
maxHeight = 0.9;
minHeight = [5 0.1];
height = null;
border = "rounded";
winOptions = {
winblend = 0;
};
};
progress = {
maxWidth = 0.9;
minWidth = [40 0.4];
width = null;
maxHeight = 0.9;
minHeight = [5 0.1];
height = null;
border = "rounded";
minimizedBorder = "none";
winOptions = {
winblend = 0;
ssh = {
border = "rounded";
};
};
};