question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interest in supporting correct hightlighting and multiple schemas?

See original GitHub issue

Summary

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
eemelicommented, Mar 9, 2021

@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.

1reaction
gorkemcommented, Apr 19, 2021

Just trying out, looks like it has fixed some of the issues that I was observing. I need to investigate the rest

Read more comments on GitHub >

github_iconTop Results From Across the Web

Page 6: Schema Instruction - IRIS Center
Schema instruction—explicit instruction in identifying word problem types, representing them correctly, and using an effective method for solving them—has been ...
Read more >
The Transforming Schema - My Teaching Cupboard
In this blog post, you will discover exactly what the transformation schema is, why it needs to be supported in your classroom, and...
Read more >
The importance of schemas in every child's learning
Schemas are those repeated patterns seen in children's behaviour, and they link directly to the development and strengthening of cognitive structures in the ......
Read more >
Constructivism - Office of Curriculum, Assessment and ...
I may decide to change my schema to accommodate this person by deciding a friend doesn't always need to be nice if they...
Read more >
Schema-Focused Relationship Problems - PsychSolve
A schema is a strongly held belief that a person has about himself or herself, about other people, or about the world in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found