Closed ptn closed 4 months ago
I would love to see a feature like this
You can use winbar for that, since there are path information you can get from api
Winbar is the recommended way to do this. If you're using a statusline plugin they probably have a way to configure the winbar, but with raw Neovim APIs you can do this:
function OilDir() return require("oil").get_current_dir() end
vim.api.nvim_create_autocmd("BufWinEnter", {
callback = function(ev)
if vim.bo[ev.buf].filetype == "oil" and vim.api.nvim_get_current_buf() == ev.buf then
vim.api.nvim_set_option_value("winbar", "%{%v:lua.OilDir()%}", { scope = "local", win = 0 })
end
end,
})
ctrl+g
can be useful as well.
Did you check existing requests?
Describe the feature
My oil looks like this:
I have no idea what dir that is, having a header that states what directory oil is displaying would be absurdly helpful.
Provide background
No response
What is the significance of this feature?
strongly desired
Additional details
Here's my config: