Maintain relative directory in plugins which open buffers
Contributing guidelines
- [X] I have read CONTRIBUTING.md
- [X] I have read CODE_OF_CONDUCT.md
Module(s)
mini.start, mini.pick, (maybe others...)
Description
As described here: https://github.com/echasnovski/mini.nvim/discussions/1038#discussioncomment-10011047
Various mini.nvim plugins do not maintain relative directories when opening buffers.
This results in vim's buffer command having fully qualified paths (or close to that) and not relative paths when showing open buffers.
mini.nvim should preserve relative paths when opening buffers by opening them relative and not fully qualified.
Thanks for the suggestion!
I'll take a look.
This should (finally) be resolved on latest main. Fixing it for 'mini.starter' was relatively straightforward (although required some experimentation for the case when there is a swap file for the path), but MiniExtra.pickers.lsp required custom hacky workaround as I couldn't even find why a "normal" vim.fn.bufadd(vim.fn.fnamemodify(path, ':.')) doesn't work inside on_list option of vim.lsp.buf methods.
Awesome! Yes I remember certain scenarios with this specific topic being a bit of a pain. Thanks for the effort :)