-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Order of suggestions in Quick Fix #297
Comments
I think this is a duplicate of #129. |
It is similar and I am indeed on macOS where However, my point is that correcting an obvious mistyped word requires at least one more keystroke after the quick fix trigger — and at least 3 (!) on macOS. Besides, even for Linux / Windows, the Given that word corrections are so common, I think the quick fix menu should present it first. |
From a UX perspective, you're totally right. But the problem with the example in #129 (comment) (screenshot) remains. I wouldn't expect other entries like IMO, the ideal solution would be to have nested menus/quick fixes, but this would be an issue for VS Code or LSP. |
I just found out you can assign keyboard shortcuts to specific "kinds" of quick fixes. The kind for {
"key": "cmd+shift+q",
"command": "editor.action.codeAction",
"args": {
"kind": "quickfix.ltex.acceptSuggestions"
}
} Then you can press |
That's neat, it's an improvement 🙂 Except that {
"key": "cmd+;",
"command": "editor.action.codeAction",
"args": {
"kind": "quickfix.ltex.acceptSuggestions"
}
} |
I understand your point and #129 is indeed a pathological example. In place of context menus, maybe a viable alternative is to put the For example
While the above keybinding works perfectly for me, I still think the out of the box config should suggest corrections before exceptions. |
I've come to the conclusion that having more than 5 or so suggestions is already bad UX: If the correct word is not in the top 5, then just fixing the mistake by hand is probably faster than searching for the correct word in a long list. So I'll just truncate the list to this length and reorder the quick fixes. However, while experimenting, I noticed that VS Code does reorder the quick fixes, at least when computing them for a selection range (could also be the case for the other editors LTEX is supporting). This means that while I'm trying to fix this, I won't guarantee any order. If it's still wrong then, you have to open an issue over at microsoft/vscode. |
Implemented as explained in my previous comment. Thanks for the suggestion. |
Thank you for having rethink this, I think it is the correct fix. |
Feature released in 10.2.0. |
When correcting a word with Quick Fix on say the mistyped 'helol' word, the order of suggestions is
Most of the time, one needs to correct the word rather that mark it as an exception.
I suggest the default order for Quick Fix to be reversed, as in
(but maybe it's vscode who enforces quick fixes in alphabetical order?)
The text was updated successfully, but these errors were encountered: