Skip to content

Support variable line heights in the editor #147067

Closed

Description

This would allow to use larger font sizes for markdown headers.

Activity

  1. added
    feature-request
    editor-core
    on Apr 8, 2022
  2. usernamehw commented on May 5, 2022

    @usernamehw
    Contributor

    Henning Dieterichs (@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).

  3. hediet commented on May 5, 2022

    @hediet
    MemberAuthor

    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?

  4. usernamehw commented on May 5, 2022

    @usernamehw
    Contributor

    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)]);

  5. yume-chan commented on May 11, 2022

    @yume-chan
    Contributor
  6. folcik commented on Mar 31, 2023

    @folcik

    +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:

    • Different font (size/family/height) for keywords or for searched text
    • Inline markdown editor/viewer
    • Inline images or icons
    • Increasing or reducing the size of font/lines that may be irrelevant (say, big function header comments can be slightly smaller if you want them to be less distracting, or TODO items could be larger or more apparent)
    • Could allow some very clever community extensions for "rich" editing (I understand this is not intended to be a rich text editor, but it is very close to being able to be one)
  7. MrScottyTay commented on Nov 14, 2023

    @MrScottyTay

    +1 Trying to migrate over to VS Code and the shrink empty lines extension for Visual Studio was amazing

  8. aiday-mar commented on Jan 6, 2025

    @aiday-mar
    Collaborator

    This issue will be used to track variable line heights only
    The following issue will be used to track variable fonts: #237346. Ie, the previous issue will be used to track adding the possibility to define different font families, font sizes etc.
    The issue is therefore split into two parts.

  9. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Apr 14, 2025
  10. 0009-0009-1013-986X commented on Apr 15, 2025

    @0009-0009-1013-986X
  11. aiday-mar commented on Apr 15, 2025

    @aiday-mar
    Collaborator

    So yesterday we have merged code to allow variable line heights to be defined. This is now possible. I am currently working on allowing variable font sizes/families in the editor. The relevant issue is here: #237346

  12. locked and limited conversation to collaborators on May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-corefeature-requestinsiders-releasedon-testplan

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions