feat: expose buf_options in config (#28)
This commit is contained in:
parent
f8ca564802
commit
997d9cd78a
2 changed files with 5 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue