mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 10:05:17 +00:00
yes
This commit is contained in:
parent
6da7199231
commit
1ee6463a9e
2 changed files with 17 additions and 5 deletions
|
|
@ -5,6 +5,18 @@ return {
|
|||
keys = {
|
||||
{ "-", "<cmd>Oil<cr>", desc = "Open parent directory" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("oil").setup(opts)
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "oil://*",
|
||||
callback = function()
|
||||
local dir = require("oil").get_current_dir()
|
||||
if dir then
|
||||
vim.cmd.lcd(dir)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
default_file_explorer = true, -- nvim . opens oil
|
||||
columns = { "icon" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue