redhat-developer / redhat-developer/vscode-yaml
Provide a custom request to open yaml file and select a given property key
Nobody has claimed this yet.
- 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.
vscode-microprofile depends vscode-yaml to manage completion, validation, hover, etc for application.yaml. To do that we generate a JSON Schema according to the Java project classpath.
In Quarkus/MicroProfile, we can declare a property foo.bar in Java file:
public class Test {
@ConfigProperty(name = "foo.bar")
private Integer test;
}
and we can configure this property with the application.yaml like this:
foo:
bar: 10
I'm implementing go to the definition from the Java file to the properties file and yaml file. In other words, when cursor is inside the name of the annotation (see cursor at |);
@ConfigProperty(name = "foo|.bar")
I would like to open the application.yaml and select the bar property key even if application.yaml is not opened.
Describe the solution you would like
It should be nice if we could consume a custom service like selectPropertyKey("foo.bar") to open the application.yaml and select the property key.
Describe alternatives you have considered
I will try for the moment to open the application.yaml with standard LSP definition request by setting 0 as location.
Thanks for your help!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the standard LSP definition request, which the issue says is currently used with location 0. Define how a custom selectPropertyKey("foo.bar") service should open application.yaml and select the nested key when the file is closed. Done means vscode-microprofile can invoke the service and reach the foo.bar property.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, yaml
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100