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

Use CodeAction over command #1704

Merged
merged 3 commits into from
Jul 30, 2020
Merged

Use CodeAction over command #1704

merged 3 commits into from
Jul 30, 2020

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Feb 13, 2020

Switch the code action provider to use CodeActions instead of commands. CodeActions work better with VS Code's Refactor commands. They also let us avoid an extra command invocation

mjbvz and others added 3 commits February 12, 2020 18:37
Switch the code action provider to use CodeActions instead of commands. CodeActions work better with VS Code's `Refactor` commands. They also let us avoid an extra command invocation
@rchl
Copy link
Collaborator

rchl commented Aug 4, 2020

@mjbvz While the vetur.applyWorkspaceEdits was refactored to be a pure code action with edit, the vetur.chooseTypeScriptRefactoring is still implemented in the extension so doesn't work in other editors.

Can you say something about that? Is there a reason you couldn't refactor that also?

I understand that for performance reasons you might want to delay computations and thus use the command but I'm not quite sure I understand why it can't be a pure server command instead.

@yoyo930021
Copy link
Member

@mjbvz While the vetur.applyWorkspaceEdits was refactored to be a pure code action with edit, the vetur.chooseTypeScriptRefactoring is still implemented in the extension so doesn't work in other editors.

Can you say something about that? Is there a reason you couldn't refactor that also?

I understand that for performance reasons you might want to delay computations and thus use the command but I'm not quite sure I understand why it can't be a pure server command instead.

I will study this question when I refactor #1495.
I will try to use a pure server command instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants