How to show quick suggestions in yaml strings
See original GitHub issuemonaco-editor version: 0.21.2 Browser: chrome OS: macos big sur Playground code that reproduces the issue: https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-completion-provider-example
change lang json
to yaml
,code suggest will not working
maybe some configuration wrong,like worker etc. ,could show some example.
this is my worker configuration
getWorkerUrl: function (moduleId, label) {
if (label === "json") {
return "./worker-json.js";
}
if (label === "css") {
return "./worker-css.js";
}
if (label === 'html') {
return './worker-html.js';
}
if (label === 'typescript' || label === 'javascript') {
return './worker-javascript.js';
}
return "./worker-editor.js";
},
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
YAML Tutorial: Everything You Need to Get Started in ...
This YAML tutorial will demonstrate the language syntax with a guide and some simple coding examples in Python. YAML has broad language support ......
Read more >YAML - Quick Guide
The shortcut key combination for commenting YAML blocks is Ctrl+Q. If you are using Sublime Text editor, the steps for commenting the block...
Read more >10 YAML tips for people who hate YAML | Enable Sysadmin
1. Use a linter ... Ideally, programming languages and markup languages use predictable syntax. Computers tend to do well with predictability, so ...
Read more >YAML: Do I need quotes for strings in YAML?
In general, you don't need quotes. · Use quotes to force a string, e.g. if your key or value is 10 but you...
Read more >How to create your own auto-completion for JSON and ...
For example, If you have a package.json file opened in VS Code, you can tap CTRL + Space and a pop-up will appear,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@alexdima Debugging the example above I see that with json it’s a ‘other’ token, while in yaml a string token. The editor doesn’t show quick suggestions when in a string token.
Thanks for figuring this out @aeschli . I think the solution is to configure the editor with
quickSuggestions: { other: true, strings: true }
.So this works for me: