-
Hi, noticed an issue with custom language definition and shortcuts support. Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Linkhttps://microsoft.github.io/monaco-editor/monarch.html Monaco Editor Playground CodeNo response Reproduction StepsTry to use cmd + / (on macOS) to comment Actual (Problematic) BehaviorNothing happens and user needs to manually type comment pattern. Expected BehaviorLine will be commented out. Additional ContextThis happens only if custom language syntax definition used |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Monarch playground only allows you to specify the syntax highlighting part of a language that you would feed into |
Beta Was this translation helpful? Give feedback.
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 callingmonaco.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.