Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity for search/symbol #168

Open
rista404 opened this issue Dec 17, 2019 · 1 comment
Open

Case sensitivity for search/symbol #168

rista404 opened this issue Dec 17, 2019 · 1 comment

Comments

@rista404
Copy link

Hey there! Thanks for such a simple and nice editor!

I've been using it for a few days now, and I would love to have a simple case sensitivity switch - I find it confusing when trying to jump to a symbol and it's not appearing.

I've read the warning in the docs, but if you think it's somewhat simple to implement this (maybe adding a case_sensitive key inside amp/config.yml?), I would be happy to try and open a PR (need to stretch my Rust knowledge though).

@jmacdonald
Copy link
Owner

Hi @rista404! Thanks, I'm glad you like it. 🙂

This is definitely on my list; it's a pet peeve of mine, too. I've solved it for the fuzzy finder, but I need to solve it at the bloodhound crate level, to be honest. The challenge is that I want to keep the original mixed-case version of the entries in the index for the UI, but then discard the case when searching. Doing that naively during the search step would be very wasteful, as it's an expensive operation that's run O(n) times on each keystroke. I need to enable configuration on the index such that, if a case_insensitive option is passed, an additional lowercase version is generated when the index is populated, to avoid recomputing those on every search.

Definitely going to work on this, though; it's easy enough, it's clearly an annoyance, and it's inconsistent across file and symbol searching. Thanks for the nudge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants