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

Change autocomplete matching and highlight to fuzzy matching #51

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

svr2kos2
Copy link
Contributor

There is one problem: when we type sink, the highlight result will be StringSink.
This issue only involves the highlight behavior, and there’s no problem with the autocomplete result.
I believe this problem falls under the match quality area. Maybe we should solve it when implementing other features related to match quality, such as result sorting, syntax analysis, or providing interfaces to integrate with existing code analyzers.

@MegatronKing
Copy link
Member

Thank you, I can understand your code, but I think it is not a good idea to modify the matching logic directly. We should add some new implementation classes of CodePrompt instead of modifying the existing class.

@svr2kos2
Copy link
Contributor Author

svr2kos2 commented Nov 1, 2024

Could you please clarify your concern?
I don’t quite understand why we wouldn’t want to use a better matching method as the default.
I’m willing to make some commits to accommodate your point of view.
Please let me know if you have any additional considerations.

@MegatronKing
Copy link
Member

Sorry, I forget to reply this PR.

CodePrompt is a pure abstract class, an interface, you can implement this to write your own matching logic. If you are going to add default implementation inside this class, I don't think it is a good idea.

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

Successfully merging this pull request may close these issues.

2 participants