jakemason/ouroboros.nvim

Remove ./ if in same directory

Closed this issue · 6 comments

It would look a bit cleaner if the file path of the second file was displayed in the same path format as the first one.
What I mean is that when I open a few files nvim -O {a,b,c}.hpp their paths in the status bar are displayed simply as a.hpp, while the belonging cpp file's path gets displayed as ./a.cpp.

My mapping is this:
vim.keymap.set('n', '<C-h>', ':Ouroboros<CR>', { silent = true })

Can you what the folder structure looks like when this happens?

Mine doesn't include the "./" in either the .hpp or the .cpp files. Could be a config in my vim file that I don't remember setting though so I'll investigate more soon...

They are in the same folder src/file.{cpp,hpp} with my working directory being src.

I can't seem to replicate this. Here's my structure:

Screenshot 2023-07-20 114208

And here's what happens when I repeatedly invoke Ouroboros:

demo.mp4

ezgif-5-e972a3933e

This is how it looks on my end

So I think this isn't related to this plugin, but rather to individual status bar configurations.

All that this plugin does is find a matching file and then execute :edit {filename}... what happens if you do :edit and pick the alternate file yourself? Do you still see the relative path "./" in your status bar?

Haven't heard back on this so I'm closing it as resolved. Let me know if you do have further concerns and we can look at this again, but I think this is just a status bar configuration and not related to Ouroboros' functionality.

Cheers,
Jake