You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If possible I would like to inline schema like this: # $schema=...
Would be more consistent with the way you do it in JSON and would be more compatible with Intellij and maybe other IDEs
Describe alternatives you have considered
Additional context
I use yaml with JSON Schema a lot in VS Code. Many of my colleagues use Intellij for YAML editing.
Both IDE's have a slightly different way to inline the JSON Schema.
Is your enhancement related to a problem? Please describe.
Not really. Feature works as expected, I just always need to look up the right way to use inline schema (https://github.com/redhat-developer/yaml-language-server?tab=readme-ov-file#using-inlined-schema)
Describe the solution you would like
If possible I would like to inline schema like this:
# $schema=...
Would be more consistent with the way you do it in JSON and would be more compatible with Intellij and maybe other IDEs
Describe alternatives you have considered
Additional context
I use yaml with JSON Schema a lot in VS Code. Many of my colleagues use Intellij for YAML editing.
Both IDE's have a slightly different way to inline the JSON Schema.
# yaml-language-server: $schema=....
# $schema=....
Probably the place that needs changing/extending
In doComplete of yamlCompletion.ts
For commitId [dfccc6f] it was around the line 319
if (isModeline(lineContent) || isInComment(doc.tokens, offset)) {
IsModeline is pretty straight forward. Couldn't figure out how isInComment was expected to behave here
Additionally the docs need a small update for this change and maybe the unit tests
The full relevant code fragment
The text was updated successfully, but these errors were encountered: