Relative Content

Tag Archive for javascriptmonaco-editor

Update CodeLens titles by timer

I have a project using Monaco-editor. We use it for ST language and we need to realize realtime displaying values for variables. For this feature I want to use CodeLens to display value and then when user click on this CodeLens editor opens window to set variable value.

Monaco editor: how to auto indent on paste (without doing other formatting)?

I want to have in monaco editor a feature to automatically correctly indent the pasted code. E.g. if I paste a function inside another function, all subsequent lines of the pasted function should increase indentation to match the first line.
To some extent I managed to do it by enabling formatOnPaste: true option, but I have 2 problems with this:

Can the Monaco Editor use different line numbering based on the model?

I’m using the Monaco Editor to display some custom file types.
For these files, I need to customize the displayed line numbers based on the models. This is fine for a single model but not when I want to peek to the definition in another model/file. (For the content, the displayed line numbers don’t always start at the same number and some physical lines in the file don’t count as a line and so shouldn’t have a line number displayed next to them.)