Add support for quick help in monaco-json
See original GitHub issueI would like to add support for quick help in JSON language support if a JSON schema is provided for the JSON file the user is editing. Here is an example:

It’s possible to implement it using overlay widgets but the language support doesn’t work on the main thread and instead runs under the LSP. Ideally, we can send a message from the WebWorker to the main thread and create an overlay widget for the editors if a flag is enabled.
The main problem is that the LSP doesn’t really have an access to the editor, I can work on this feature and create a PR on monaco-json if there’s interest, I already have a prototype but couldn’t really find a way to make this feature embedded into monaco-json as we don’t have access to the created editors. Instead, I’m creating an overlay widget in my editor separately talking to the language server.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
IMO adding to monaco-json is not the right approach as this is quite a specific feature. Instead you could be looking into having your own monaco-json and replace the original one.
I forked monaco-json and implemented
getSchema(uri: Uri, position: Position)``monaco.languages.json.getWorker()and implemented an overlay widget using json-schema-visualizer. It looks to be the convenient way for this use-case. Thanks!