Monaco-editor: Add stickiness decoration option into the playground example

Created on 11 Aug 2019  路  3Comments  路  Source: microsoft/monaco-editor

monaco-editor version: Actual Playground
Browser: Chrome 76.0.3809.100
OS: Windows 10

Go to https://microsoft.github.io/monaco-editor/playground.html#interacting-with-the-editor-rendering-glyphs-in-the-margin
Set cursor to the start of the line number 3.
Press Enter.

image

documentation feature-request

Most helpful comment

That's what the stickiness property is for AFAICT. You can try it with the following options object

options: {
    isWholeLine: true,
    className: 'myContentClass',
    glyphMarginClassName: 'myGlyphMarginClass',
    stickiness: monaco.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
}

All 3 comments

That's what the stickiness property is for AFAICT. You can try it with the following options object

options: {
    isWholeLine: true,
    className: 'myContentClass',
    glyphMarginClassName: 'myGlyphMarginClass',
    stickiness: monaco.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
}

I consider that is most powerful option and it should be adding into the playground example.

PR welcome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ascoders picture ascoders  路  22Comments

AchimKO picture AchimKO  路  20Comments

sinaa picture sinaa  路  26Comments

meyer picture meyer  路  33Comments

gynet picture gynet  路  22Comments