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

Run other vscode extension on save #46

Open
vedartm opened this issue Apr 29, 2020 · 2 comments
Open

Run other vscode extension on save #46

vedartm opened this issue Apr 29, 2020 · 2 comments

Comments

@vedartm
Copy link

vedartm commented Apr 29, 2020

Is there any option to run another extension command inside cmd?
For example,

            {
                "match": "\\.dart",
                "cmd": "dart-import.fix"
            }

where dart-import.fix is the command from another extension

@vedartm vedartm changed the title Run other vs code extension Run other vs code extension on save Apr 29, 2020
@vedartm vedartm changed the title Run other vs code extension on save Run other vscode extension on save Apr 29, 2020
@jednano
Copy link

jednano commented Jun 14, 2020

Are you aware of the built-in vscode feature, codeActionsOnSave?

// settings.json
{
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  },
}

You can also scope it to a particular language, something like:

  "[dart]": {
    "editor.codeActionsOnSave": {
      "dart-import.fix": true 
    }
  },

@vedartm
Copy link
Author

vedartm commented Jun 15, 2020

I am aware of that but I cannot use it to trigger a command from another extension. Basically on save it should trigger this extension - https://github.com/luanpotter/vscode-dart-import

dart-import.fix or source.fixAll does not work like the extension does.

My question is, is there any way trigger this external extension command on save instead of calling it seperately

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

No branches or pull requests

2 participants