monaco-editor
monaco-editor copied to clipboard
[Bug] Option `bracketPairColorization` does not work
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Code
monaco.editor.create(document.getElementById('container'), {
value: '(((()))){{{{}}}}[[[[]]]]',
language: 'csharp',
bracketPairColorization: {
enabled: true
}
});
Actual Behavior
Bracket pair colorization does not work, no matter what language is set.
Expected Behavior
Brackets being colorized
Additional Context
I have tried languages: csharp, css, html, javascript
How about 'cpp', have you tried? language: 'cpp',
It does not matter what language you specify, bracket colorization never works as far as I can tell.
This works, against the typing:
monaco.editor.create(document.getElementById('container'), {
value: '(((()))){{{{}}}}[[[[]]]]',
language: 'csharp',
'bracketPairColorization.enabled': true,
});
This is definitely a bug though.
@hediet Confirmed! Is there a way to make this work via a typing extension for Typescipt? So I don't have to cast to any
...
This works, against the typing:
What is the typing!?
What is the typing!?
I was referring to the typescript types.
When i post it into the playground, the colored braces appear for a second, then they disappear again. Its like its rendered correctly and then immediately rerendered wrong.
Also the matchBrackets functionality seems broken.
Same for me!
bracketPairColorization and matchBrackets doesn't work at all :(
Aye, bracketPairColorization and matchBrackets both don't work. Rolling back to 0.31.0 works fine
@ColinBradley how did you roll back? git tags are not set for v0.31.0 or even v0.34.0
edit: 0.31.0 exists without the v prefix
edit: i have the same problem with 0.31.0 - the colored braces popup colored for a second, then they go grey again.
Also hit this (cc @jeremy-rifkin ). We see this in all languages, and it's easy to repro in the Monaco Editor playground as per the original report).
Seen most recently in 0.36.1
https://microsoft.github.io/monaco-editor/playground.html?source=v0.36.1#XQAAAAL8AAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscovwBTfVOOo4AuRGzYGy8DBvknaaXft9rWb1w8nFlXgKvv6gQ-8WWRoaJxf4YK1BpWeTgWlwgQ6ptrf92RgJkcqUajbS4XqzFrCLmx5_4QNJ_DBYNOj-yKrNBpQncSILkuwvv_ShU7Ckbk0xmZkfvpI28LzEsC64RngK1a5vZvIZ9fxSJikM-hHPX__94zwAA
Works now
Hi @hediet, shouldn't the bracket pairs be colored differently when enabled
is false
?
https://microsoft.github.io/monaco-editor/playground.html?source=v0.36.1#XQAAAAL9AAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscoyOBTfVOOo4AuRGzYGy8DBvknaaXft9rWb1w8nFlXgKvv6gQ-8WWRoaJxf4YK1BpWeTgWlwgQ6ptrf92RgJkcqUajbS4XqzFrCLmx5_4QNJ_DBYNOj-yKrNBpQncSILkuwvv_ShU7Ckbk0xmZkfvpI28LzEsC634vuMIi_K1lRocBCleP79lIPgCzn_7CNEA
see https://github.com/microsoft/monaco-editor/issues/3829
Thanks so much