feat: config option to disable directory hijacking (#76)
This commit is contained in:
parent
57451c517d
commit
3d3df74532
4 changed files with 9 additions and 0 deletions
|
|
@ -22,6 +22,8 @@ local default_config = {
|
|||
conceallevel = 3,
|
||||
concealcursor = "n",
|
||||
},
|
||||
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`
|
||||
default_file_explorer = true,
|
||||
-- Restore window options to previous values when leaving an oil buffer
|
||||
restore_win_options = true,
|
||||
-- Skip the confirmation popup for simple operations
|
||||
|
|
|
|||
|
|
@ -459,6 +459,9 @@ end
|
|||
local function maybe_hijack_directory_buffer(bufnr)
|
||||
local config = require("oil.config")
|
||||
local util = require("oil.util")
|
||||
if not config.default_file_explorer then
|
||||
return
|
||||
end
|
||||
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
||||
if bufname == "" then
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue