Closed tpict closed 4 months ago
Are all buffer names prefixed with oil://
or just buffers holding directory listings?
vim-rooter gets the current path in a few places:
The latter two call s:current()
.
Now that I write it out, I'm not sure why the first one doesn't just call s:current()
.
Are you asking for s:current()
to be replaceable by a user-supplied function?
Are all buffer names prefixed with oil:// or just buffers holding directory listings?
yep, the latter
Are you asking for s:current() to be replaceable by a user-supplied function?
I think so, yeah, possibly with the option to return v:null
to fall back to the default behavior.
Ok, and what problem is vim-rooter causing by not triggering on a directory listing?
With other plugins that do the same thing (dirvish, dirbuf.nvim), vim-rooter is triggered when navigating directories, which is desirable for me 😄
Please can you try out the branch in #137?
I was recently trying out https://github.com/stevearc/oil.nvim, but found that it didn't trigger vim-rooter because the buffer name is prefixed with
oil://
.Would it be possible to add a configuration option for a function that receives a buffer, and returns a file path? It would default to
expand('%')
(or whatever the current behavior is). Then the user could filter out URI protocols etc as needed.This could also be used to enable things like syncing with the active directory in a Neovim terminal buffer.
Thanks!