redhat-developer / redhat-developer/vscode-yaml

Add command to open schema file for the current buffer.

Open
#889 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Is your enhancement related to a problem? Please describe.

Sometimes it is very hard to find an authoritative documentation for a specific configuration format.

But sometimes also there is a schema for it , with a lot of details about the format.

It's not too hard to look up the schema, but the YAML extension already does this anyway, so why not just add a command that will open the schema for the current file in a new read-only editor window ?

Describe the solution you would like

Adding a new command that will open the schema file for the current window in a new read-only editor window.
This is the file that matches the schema displayed in the status bar and that the extension probably has stashed somewhere.

Ideally, when clicking on the schema name displayed in the status bar it should call this command, but I don't know if it's feasible with the VSCode UI conventions.

Describe alternatives you have considered

Doing the same work by hand, knowing the extension does it anyway and has the data somewhere.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the command registration and the status-bar schema display mentioned in the issue, then trace how the YAML extension obtains the schema for the current buffer. Determine how to open that schema in a new read-only editor window and whether the status-bar schema name can invoke the command. Done means the current file's displayed schema opens read-only through the new command.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.