-
Notifications
You must be signed in to change notification settings - Fork 0
config
this the avaible option on the setup function opts
this field determines how the border style of file explorer is
the border table avaible fields is up, left, main, right
with the value is border style like
nvim_open_win()
border config
default value:
{
main = "double",
left = "rounded",
right = "rounded",
up = { "╭", "─", "╮", ":", "╯", "─", "╰", ":" },
}example:
require("simplyfile").setup {
border = {
up = { "", "", "", "|", "/", "_", "\\", "|" },
main = {
{ "#", "MyMainCorner" },
{ "+", "MyMainBorder" },
},
},
}determine the plugin should use default keymaps or not, see default keymaps, default true.
key maps for the file explorer, this keymaps override default_keymaps
field. default is empty table {},
example keymap: map d to remove file/folder using trash-cli:
require("simplyfile").setup {
keymaps = {
d = function(dir)
os.execute("trash " .. dir.absolute)
end,
}
}open file explorer on enter neovim
preview have this fields
-
show: determine if the file is can show on the preview window(right window) on explorer or not, show must be boolean or function that return boolean and passed one selected dir, default true.Example:
require("simplyfile").setup { preview = { show = function(dir) if dir.is_folder then -- don't show node_mopdules and .git -- folder on preview window if dir.name == "node_modules" then return false elseif dir.name == ".git" then return false else return true end else -- don't preview image on preview window if dir.name:match("%.png$") then return false else return true end end, end }, }
-
max_lines: max lines that can be shown on the preview the value can be a integer or function that not take any argument and return an integer.default:
function() return vim.o.lines end
example:
require("simplyfile").setup { preview = { max_lines = 1, }, }