Move TS/JS to use organize imports codeAction instead of command#47850
Merged
mjbvz merged 4 commits intomicrosoft:masterfrom Apr 18, 2018
Merged
Move TS/JS to use organize imports codeAction instead of command#47850mjbvz merged 4 commits intomicrosoft:masterfrom
mjbvz merged 4 commits intomicrosoft:masterfrom
Conversation
jrieken
reviewed
Apr 17, 2018
Member
There was a problem hiding this comment.
Can we have a more generic context key? We could use equality or the regex support. Something like supportedCodeAction ~= /source\.organizeImports.*/
Collaborator
Author
There was a problem hiding this comment.
Done. supportedCodeAction is a space separated list of provided kinds. The regexp you use will typically look like:
/\bsource\.organizeImports(\b|\.)/Which will match source.organizeImports as well as source.organizeImports.alphabetically
src/vs/vscode.d.ts
Outdated
Member
There was a problem hiding this comment.
Please document the actual value
555413d to
fc0c499
Compare
Fixes microsoft#47845 Fixes microsoft#46647 - Defines a new standard `SourceOrganizeImports` `CodeActionKind` to be used to implement organize imports in a consistent way. - Add a new `Organize imports` command and keybinding that executes these actions. - Move over the existing js/ts organize imports command to use the new code action kind
3b97519 to
378c760
Compare
Make sure we only match whole scopes and not `unicorn.source.organizeImports`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #47845
Fixes #46647
SourceOrganizeImportsCodeActionKindto be used to implement organize imports in a consistent way.Organize importscommand and keybinding that executes these actions.