Skip to content

[Bug] Comment shortcut not working for custom language syntax definition #3840

Answered by spahnke
xleepy asked this question in Q&A
Discussion options

You must be logged in to vote

The Monarch playground only allows you to specify the syntax highlighting part of a language that you would feed into monaco.languages.setMonarchTokensProvider IIRC. However, there is a second part to a language that is set by calling monaco.languages.setLanguageConfiguration which includes information like comment characters, bracket characters, etc. Only if you specify this second part the editor knows about comment characters and can apply the "toggle line comment" command.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xleepy
Comment options

Answer selected by hediet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3831 on March 15, 2023 09:42.