shun / ddu-source-rg

MIT License
31 stars 16 forks source link

return relative paths if given #22

Closed dmfay closed 1 year ago

dmfay commented 1 year ago

I noticed that ddu-source-rg was returning absolute paths to items, so when ddu opened a file the entire path displayed in the statusline.

Shougo commented 1 year ago

It should not. Because ddu-kind-file requires absolute path to execute actions.

dmfay commented 1 year ago

It should not. Because ddu-kind-file requires absolute path to execute actions.

fair enough! It seemed to work for me but I only use the open action. It makes sense that there would be others that need absolute paths.

Vim/Neovim's status line item %f displays the file path as typed. With long absolute paths this hides other important information, and there is no built-in way to convert it to a relative path.

Would it be appropriate to provide a relative path to the open action in ddu-kind-file if the file is somewhere under the cwd?

Shougo commented 1 year ago

Would it be appropriate to provide a relative path to the open action in ddu-kind-file if the file is somewhere under the cwd?

OK. Please wait.

Shougo commented 1 year ago

Fixed. Please update ddu.vim.

shun commented 1 year ago

@Shougo Thanks for your quick support 🙇🏼‍♂️

dmfay commented 1 year ago

Thank you both!