PeekViewWidget in theia

HI All,

I am looking for any existing example to create PeekViewWidget like the VSCode problems marker.

Can someone point me to it, or help me figure out if it is possible in theia via VScode API.

Hi @abchakra,

I think, one way of doing that is to implement a custom content widget using Monaco’s ICodeEditor.changeViewZones() API. An example for doing that with Monaco API is in the Monaco Playground. I think this should also be usable directly within Theia as soon as you gain access to the instance of Theia’s MonacoEditor class and accessing the Monaco editor instance via MonacoEditor.getControl().

In Theia, there is also MonacoEditorZoneWidget, which is for instance used to show debug exceptions in Theia. So if you are in the context of a Theia extension, this Theia API is probably even more convenient to use than using Monaco’s plain changeViewZones() API directly.

I hope this helps!

1 Like