Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97400

Is it possible to call commands between extensions in VSCode?

$
0
0

For example, there are two VSCode extensions:

  • extension1 has registered command exCommand1
  • extension2 has registered command exCommand2

According to documentation, a VSCode extension can call commands (ref: https://code.visualstudio.com/docs/extensionAPI/vscode-api)

executeCommand<T>(command: string, ...rest: any[]): Thenable<T | undefined>

If API Doc is correct then

  • extension1 can call exCommand2 provided by extension2
  • extension2 can call exCommand1 provided by extension1

But, VSCode's extensions are lazily loaded, so how does one call a command from another extension that may not already be loaded?


Viewing all articles
Browse latest Browse all 97400

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>