Use Monaco (VSCode editor component) with YAML language server #25286
Unanswered
drozycki
asked this question in
Automations / scripts / scenes
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've just finished writing a non-trivial automation using the integrated text editor. As a professional developer unfamiliar with YAML and Home Assistant scripting, I found the experience to be frustrating. The editor lacks domain-specific schema validation, precise error highlighting, specific error messages, auto-completion suggestions, and reference tooltips on symbol hover and as you type - features common in modern development environments like VSCode.
I propose that we use the VSCode editor component monaco-editor instead. The monaco-languageclient package can run yaml-language-server in a Web Worker and enable those modern editor conveniences. yaml-language-server supports JSON Schema for domain-specific validation, and all packages are MIT-licensed.
The monaco-languageclient docs don't have a YAML demo but you can play around with their JSON demo here.
Beta Was this translation helpful? Give feedback.
All reactions