Open hediet opened 2 years ago
@hediet Is this issue for TextMate grammar or editor decorations or both?
Grammar makes sense for markdown headers but editor decorations would be great too. For example, adding an image decoration (bigger than one line) without a webview (like code inset #85682).
It is not clear yet what mechanism will be used for that.
How would you add that image if you could set the line height? By using css?
It's already supported, the image is just very small (1 line).
In decoration options after.contentIconPath
Hmmm, actually it renders the full image ignoring width
& height
window.activeTextEditor?.setDecorations(window.createTextEditorDecorationType({
after: {
contentIconPath: Uri.parse('https://random.imagecdn.app/500/150'),
margin: '0 20ch',
height: '2ch',
width: '2ch',
},
}), [new Range(0, 0, 0, 0)]);
Another use case would be shrinking empty lines #66468
Visual Studio has an extension (by Microsoft) to do that. https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.SyntacticLineCompression2022
+1 on this Decorations can already modify the font size/font family/line height of a portion of text, but none of those changes render properly without the line height being variable. Use cases for this include:
+1 Trying to migrate over to VS Code and the shrink empty lines extension for Visual Studio was amazing
This would allow to use larger font sizes for markdown headers.