feat: expose buf_options in config (#28)

This commit is contained in:
Steven Arcangeli 2023-01-12 12:21:59 -08:00
parent f8ca564802
commit 997d9cd78a
2 changed files with 5 additions and 0 deletions

View file

@ -7,6 +7,8 @@ local default_config = {
-- "size",
-- "mtime",
},
-- Buffer-local options to use for oil buffers
buf_options = {},
-- Window-local options to use for oil buffers
win_options = {
wrap = false,

View file

@ -157,6 +157,9 @@ M.initialize = function(bufnr)
bufnr = vim.api.nvim_get_current_buf()
end
session[bufnr] = true
for k, v in pairs(config.buf_options) do
vim.api.nvim_buf_set_option(bufnr, k, v)
end
M.set_win_options()
vim.api.nvim_create_autocmd("BufHidden", {
callback = function()