Replies: 2 comments
-
PR welcome. I don't know why this rule exists: |
Beta Was this translation helpful? Give feedback.
-
The issue does not seem to be related to the name of the target. If you take your code, put it into Monaco playground, and change 'curly-brace' back to string.target, it also works.
UPDATE: on further review it seems to work fine with your originally-posted code. Perhaps you are expecting it to auto-suggest based on the current word, if one were to break up the text within the curly braces into separate words? Keep in mind that Which is from your original code, with one additional suggestion:
|
Beta Was this translation helpful? Give feedback.
-
Completion suggestions don't automatically show up between curly braces while editing Markdown in Monaco.
After playing with the Monarch definition for Markdown it turns out that the token for { } is called 'string.target'. Any token containing the word 'string' suppresses suggestions, and that renaming that token to something else will allow suggestions to work normally.
This has to be intentional, so my real question is: is this behavior configurable? Can I turn this off? Or do I have to effectively rename the token to get the desired behavior?
monaco-editor version: 0.20.0
Browser: Chrome
OS: Mac OS
Playground code that reproduces the issue:
Playground code that shows a workaround:
This example makes a new language using a copy of the Markdown definition file https://github.com/microsoft/monaco-languages/blob/master/src/markdown/markdown.ts#L143
I renamed the token matching { } to
curly-brace
fromstring.target
. With that change autocomplete works inside the braces now.Beta Was this translation helpful? Give feedback.
All reactions