Interest in supporting correct hightlighting and multiple schemas?
See original GitHub issueSummary
I would like to improve YAML editor support, and I’d rather not write & maintain my own language server.
Relevant information
I’m the main developer behind eemeli/yaml, and I’m getting incrementally closer to having its v2 release “done”. As a part of this update, I’ve refactored the parsing to include an explicit lexer as a pre-stage to its (also rewritten) concrete syntax tree builder. One reason for doing that was to enable correct highlighting of YAML in editors, as parts of the language are notoriously difficult to tokenise with regular expressions.
Separately from that, I’m interested in enabling a simultaneous parse of a document as both YAML 1.1 and YAML 1.2, in order to e.g. be able to warn a user that their input off
will get parsed as a boolean false
in one schema, and a string 'off'
in another.
As the support for semantic tokens was added to the latest LSP 3.16 release, it should be possible for a YAML language server to provide both of the above features. I would like for such a language server to exist, but I’d really rather not have to “compete” with this implementation. However, I am aware that these features may be considered beyond the scope of this project and/or require too much refactoring to be worthwhile.
Are you open to considering such developments? I’d be happy to talk about this elsewhere as well; you can reach me at eemeli@gmail.com.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16 (8 by maintainers)
@evidolob It should be able to give you the most-yamlish-possible lexing, CST and AST of any input that you throw at it, while also identifying the error or errors that make it not actually valid YAML. If there are cases where its output is suboptimal, I’d be very interested in having them identified so that I can improve on it.
Just trying out, looks like it has fixed some of the issues that I was observing. I need to investigate the rest