microsoft / microsoft/monaco-editor
Setting content for "gutter" / non-isWholeLine decorations
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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