feat: config option to disable previewing a file

This commit is contained in:
Steven Arcangeli 2024-11-21 17:36:40 -08:00
parent 5acab3d8a9
commit 3fa3161aa9
4 changed files with 19 additions and 0 deletions

View file

@ -274,6 +274,10 @@ require("oil").setup({
update_on_cursor_moved = true,
-- How to open the preview window "load"|"scratch"|"fast_scratch"
preview_method = "fast_scratch",
-- A function that returns true to disable preview on a file e.g. to avoid lag
disable_preview = function(filename)
return false
end,
-- Window-local options to use for preview window buffers
win_options = {},
},