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

Unable to restrict the search target for auto-completion of bib entries #4522

Closed
mayukonomoto opened this issue Feb 6, 2025 · 3 comments
Closed

Comments

@mayukonomoto
Copy link

When I type one or a few letters to narrows down the candidates using automatic completion for bib entries, what is being searched for?
I want to narrow down the candidates to only those that contain the input characters in the citationkey, and sort them in order of similarity to the input characters. Is there a way to set this?

In the example of the attached image, it shows the citationkey on the candidate list. However, even though there are other citationkeys that include all or part of the characters “mil” in them, they appear very late in the list or not at all.

Image

@James-Yu
Copy link
Owner

James-Yu commented Feb 6, 2025

item.filterText = item.key + ' ' + item.fields.title + ' ' + item.fields.join(fields.filter(field => field !== 'title'), false)

The filtering is based on key, title, and other bib entry fields. The sorting is controlled by vscode: we cannot change that.

@jlelong This issue makes me think, will it be a good idea to customize the filterText of bib entries? Current implementation can be a bit ambigious?

@jlelong
Copy link
Collaborator

jlelong commented Feb 6, 2025

@James-Yu it would great to make the filterText customizable through a configuration variable.

@mayukonomoto
Copy link
Author

Thank you for your quick response.
I will make use of the new setting.

I forgot to mention it at the beginning, but your plugin is always helping me with my work.
Thank you very much!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants