-
Notifications
You must be signed in to change notification settings - Fork 12.8k
"Import" suggestions should be before "Change spelling" suggestions #38743
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
Comments
I guess if you've got an exact match, that is more desirable. Side note @mjbvz, I wonder if there's a way to group some of these "fix all"s better so that the list doesn't get too long. |
The fix should simply be a matter of reordering when each codefix gets registered by updating the |
@DanielRosenwasser Opened microsoft/vscode#98613 for 'add all missing imports' coming in the middle of the other import actions |
@DanielRosenwasser if it's that simple to fix I'm happy to submit a PR here? Or is there something I am missing, given @mjbvz's comments? |
Hi @Gum-Joe , This test case is similar to what op has posted
I might be missing something here. According to fix for issue #23258 the given problem was handled |
Thank for the head's up @arunaaabh95
Also, where is |
Update: After reading this similar issue #27614. These changes need to be handled on the editor side |
@Gum-Joe |
Thank you @arunaaabh95. I'll probably have a look tonight or at some point myself. It seems the fix for this is quite large and could be a major refactor? I agree with the above comment saying this is not a good first issue, since the fix looks quite big? (still going to work/help with it though) In the mean time opening a new issue on vscode is probably a good idea? |
@Gum-Joe I think @DanielRosenwasser and @mjbvz are better judge of this, |
Glad to see there's already an issue files for this! Any update here? |
Took a look at this issue! Changed the code error number in diagnosticsMessages.json just in case to make sure import comes before check spelling. Don't think this is an issue within TypeScript, but more so with VS Code's suggestions ordering? |
@mjbvz can you give us an idea of what might be re-ordering suggestions? Emacs has the correct order so I think that eliminates the language service as the cause of this. |
This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I face the following situation multiple times per day.
TypeScript Version: 3.9.2, 4.0.0-dev
Search Terms:
Import, suggestion, spelling
I tried to google it, but I couldn't find any solutions.
Code
See the screenshot above.
Expected behavior:
The import suggestion should be the first entry in quick fixes.
Actual behavior:
The import suggestion is the last entry in quick fixes.
Related Issues:
#23258 I think it broke it. Also please see the last comment, @krryan mentions the same problem.
The text was updated successfully, but these errors were encountered: