-
Notifications
You must be signed in to change notification settings - Fork 26
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
Autocomplete improvements #75
Comments
Thanks for your reaction! Apologies for my late response.. It's ok to add extra info to TextAutoCompleteItem. (Try to match the naming of items with the langserver protocol). |
@gamecreature any thoughts on the PR style? |
Yes, I prefer several PR's, because this makes it possible to merge/evaluate them one by one. |
@gamecreature Was curious about a couple things I wanted to run by you. I'm working on integrating the Autocomplete feature into Mudlet/Mudlet and have been modifying some parts of that system. Fairly certain that all the changes are relatively universally acceptable, but I wanted your input on this.
I've modified the way
findAutoCompleteItemsForRange()
works to have it return a value indicating how good of a match it is. It's currently very simple, one value for a case-insensitivelabel_.contains
match, a better value for a case-insensitivelabel_.startsWith
match.Modified
fillAutoCompleteList()
to use aQMultiMap
instead of aQList
, so that it sorts by the value returned frommatchLabelScore()
(with lower values being higher priority on the list).I've added another property to the
TextAutoCompleteItem
class so that it can additionally hold the usage of a function(and I'm hoping to add another field explaining the effects of the function). I'm working on modifyingfillAutoCompleteList()
to useQWidgets
instead ofQListWidgetItem
, so that I can have multiple things displayed in each entry, including an icon and differently formatted text. Here's an example of what I'm aiming for(from the Eclipse IDE):In the future, I'm hoping to build in a way for the completer to pull declarations from the document you're editing so that you can see variables(and their members) from your code added to the autocomplete list. Since this seems like a far more code-intensive task than the other changes, this idea is sort of in the air for now.
Any feedback for how those ideas could be implemented in a way that is generally applicable, and not just for Mudlet would be appreciated. When I finish getting the rest of the first 3 of those ideas fleshed out in code, I'll add a link for the branch I push them into.
The text was updated successfully, but these errors were encountered: