Open kpodsiad opened 2 years ago
It seems VSCode has added support for creating action on gutter icons: https://github.com/microsoft/vscode/issues/175945
Looks like this could work, though it's not super easy. Would be awesome if there would be a way to convert them automatically from code lenses.
Is your feature request related to a problem? Please describe.
When browsing source code it's great to have such indicators available in UI, having them helps with understanding code. gutter icons are helpful for:
Describe the solution you'd like
IntelliJ Idea does a wonderful job when it comes to gutter icons, Metals & vscode can aim to achieve a comparable level of support.
From vscode perspective there is a extension sample which uses
TextEditor.setDecorations
andvscode.window.createTextEditorDecorationType
APIs. There is type calledDecorationRenderOptions
which havegutterIconPath
and https://github.com/microsoft/vscode-extension-samples/tree/main/decorator-sample.Unfortunately from what I see, although it is possible to create a gutter icon, the click action on it isn't exposed in vscode's API https://github.com/microsoft/vscode/issues/5455, it's used internally in https://github.com/microsoft/vscode/issues/5455#issuecomment-583404130 or https://github.com/microsoft/vscode/issues/5455#issuecomment-911687604
Describe alternatives you've considered
Overridden functions for instance are handled using code lenses. However, code lenses introduce a bit of noise in text editor since they are displayed in a new line.the
Additional contex
No response
Search terms
vscode gutter icons