elihunter173/dirbuf.nvim

Deprecating `hash_first`

elihunter173 opened this issue · 3 comments

I am deprecating the hash_first option with the eventual plan to remove it, making the default value of hash_first = true the only value. If you use hash_first = false, please leave a comment with a reason why you prefer it.

Originally, Dirbuf had hashes appear after the filename. However, I was convinced that having hashes before the filename is nicer because it means hashes aren't bouncing around, and it's easier to completely rename a file your cursor is on (C instead of ct<tab>). When I made this change, I made it an option to opt into the old behavior since I already had the code. I've come to regret this because it complicates Dirbuf since now there are two different line parsers, two different test cases, and two different syntax highlighting definitions I have to maintain for an option I suspect basically nobody uses.

Is it not possible to transform hash last to hash first and only maintain one set of tests? I am not against removal, but wondering if that would be something that could be tasked out. Great plugin btw, I love this model of file navigation for a text editor!

Is it not possible to transform hash last to hash first and only maintain one set of tests?

There's something like this currently in tests/buffer_spec.lua where I have a helper that I use to test both hash_first = true and hash_first = false. You still have to write out both the hash first and hash last forms though to properly test edge cases which is a bit of a drag. The real annoyance IMO is in dirbuf.buffer.parse_line()

Great plugin btw, I love this model of file navigation for a text editor!

Thank you! Glad you like it.

This option will be removed on May 23rd