microsoft / microsoft/monaco-editor

Setting content for "gutter" / non-isWholeLine decorations

Open
#322 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

editor-core feature-request
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

monaco-editor npm version: 0.7.0
Browser: Chrome 55
OS: Linux

I'm trying to replicate the "gutters" of CodeMirror. To that end I'm increasing the lineDecorationsWidth to give a large space, and then I'm trying to place non-isWholeLine decorations on relevant lines. However, I can only specify the class; not the content of the <div>. I'm trying to place x86 opcodes in the gutter as per my current CodeMirror solution: https://godbolt.org/g/vJEc6y - the address and opcodes on the left of the right-hand assembly pane.

Is there a way of setting the decoration content? The IModelDecorationOptions doesn't appear to have any way of specifying it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the IModelDecorationOptions API and the non-isWholeLine decoration behavior described in the issue. Determine how gutter content could be configured for the requested x86 addresses and opcodes, then locate the relevant API tests; done means the supported behavior is verified there.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.