Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extending VSCode, custom UI

I'm trying to write an extension for visual studio, but I'm completely new to typescript and visual studio code.
In fact I'm trying to write an extension similar to activate-power-mode for atom :

Example

All the logic is already implemented but I can't find how I could go about creating custom UI and if it's even possible with a simple extension.

like image 913
MonsieurMan Avatar asked Jan 22 '17 19:01

MonsieurMan


People also ask

How do I extend the code in Visual Studio?

You can browse and install extensions from within VS Code. Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X). This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.

Can you make a GUI in Visual Studio Code?

You can develop Java GUI applications in Visual Studio Code easily. To achieve that, you need to install the Extension Pack for Java, which includes all the required extensions to develop Java GUI applications.


2 Answers

There's a Webview API that you can use to create non-standard UI using typical HTML/CSS/JS stack. Here's the actual quote from the original doc:

Webviews can ... be used to build complex user interfaces beyond what VS Code's native APIs support.

And here's a demo of potential opportunities:

enter image description here

like image 152
jayarjo Avatar answered Oct 08 '22 07:10

jayarjo


No, this isn't possible with VS Code's extension model. Extensions run in a separate process and only have access to the editor via specific APIs. See https://code.visualstudio.com/docs/extensions/our-approach

like image 33
Rob Lourens Avatar answered Oct 08 '22 06:10

Rob Lourens