Skip to content

Conversation

Nerixyz
Copy link

@Nerixyz Nerixyz commented Oct 16, 2024

What does this PR do?

To aid interop with JetBrains' IntelliJ based IDEs, this adds support for specifying an inline-schema through # $schema: <url>. This is now the preferred way to specify an inline-schema. For backwards compatibility, the old way is still supported.

What issues does this PR fix or reference?

Fixes #959.

Is it tested? How?

Tested it with the yaml-vscode extension (and in unit tests).

  1. Below the comment, list the available completion items (in VS Code: CTRL+Space)
    # $schema: https://json.schemastore.org/clangd.json
  2. Same here, list the available completions below the comment
    # yaml-language-server: $schema=https://json.schemastore.org/clangd.json
    • In an empty file, list the available completions.
    • It should show Inline Schema. Use it.
    • It should complete to # $schema: with the cursor at the end.
    • List the available completions. It should show all available schemas.

@coveralls
Copy link

coveralls commented Feb 6, 2025

Coverage Status

coverage: 84.236% (-0.004%) from 84.24%
when pulling 58af2d7 on Nerixyz:feat/schema-interop
into 8ebaf45 on redhat-developer:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for specifying schema via # $schema: …
3 participants