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

Expose API to allow other extensions depending on this one register custom watches #32

Open
vaclavHala opened this issue Mar 1, 2023 · 0 comments

Comments

@vaclavHala
Copy link

Hi, it'd be neat to allow programmatic registration of ICommands.

We have an extension which needs to do some file watching and rather than basically rewriting what you have here from scratch we'd like to do something like the following:

// code in activate() of our extension
let watcher = extensions.getExtension('filewatcher').exports; // also possibly activate the ext here
watcher.register({
  "match": "*.foo",
  "isAsync": true,
  "cmd": "echo '${file} bar'",
  "event": "onFileChange"
})

I haven't fully thought through how to show to the user what commands were registered this way. I guess there are multiple options - e.g. have some read-only view which would expose these, or dump these to some config file directly (probably not the user config).

Is this something you'd consider having in your extension? I'd be willing to contribute the patch if you agre to go through with this idea

@appulate appulate deleted a comment from rrmistry Jul 4, 2024
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

1 participant