microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.9k stars 28.22k forks source link

Custom peek widgets #3220

Open mikewl opened 8 years ago

mikewl commented 8 years ago

LightTable and Swift allow for inline evaluation which also places the results in line with the particular line of source which was evaluated.

A new widget would be necessary for this. This widget would be able to hold values or arrays or plots with arrays and plots requiring expansion to be shown fully as to not clutter the editor. The widget would not be dismissed upon losing focus and multiple widgets are possible in the editor.

https://github.com/JunoLab/atom-ink and https://github.com/nteract/hydrogen are two examples of this done in atom.

Below are two example images from Juno which is based on LightTable. image image

Coolroo commented 1 year ago

@Linzecong I think it is named "inline completion".

It is, but it can only be inserted at the cursor which means you can only have one at a time in a file. It also means that it will insert the content text, which limits its uses

Linzecong commented 1 year ago

@Linzecong I think it is named "inline completion".

It is, but it can only be inserted at the cursor which means you can only have one at a time in a file. It also means that it will insert the content text, which limits its uses

Indeed, inline completion can be used for code completion, but it has many usage limitations that prevent me from freely controlling its display and using it independently in other situations.

Ivorforce commented 1 year ago

For anyone like me who's looking at this just needing to insert interline HTML, there is a feature called Editor Insets. It's been merged into main, although its acceptance into production has been ignored for a good few years. Still, you can use it now in VSCode Insiders!