Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to add a shortcut to my VsCode extension?

I created an extension with VsCode but I want to start my extension without typing the command in the command bar (CTRL + SHIFT + P). I dont know how to achieve this.

Something like this:

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

If we click on Ponicode: Unit Test, it starts the command directly.

>Solution :

The feature you are searching about is CodeLens.

Documentation

https://code.visualstudio.com/api/language-extensions/programmatic-language-features#codelens-show-actionable-context-information-within-source-code

Sample

https://github.com/microsoft/vscode-extension-samples/tree/main/codelens-sample

Extensions using CodeLens

https://code.visualstudio.com/blogs/2017/02/12/code-lens-roundup

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading