Skip to content

Provide a custom request to open yaml file and select a given property key #402

@angelozerr

Description

@angelozerr

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions