Skip to content

Map<K,V> with escaped key not works properly in application.yml #1243

Closed
@musashi-miyamoto

Description

@musashi-miyamoto

Describe the bug
If map key is escaped string (like [/**]), VSCode YAML code completion not works properly.

To Reproduce

  • Windows 11 23H2 (Build 22631.3447)
  • OpenJDK 21.0.2
  • Spring Boot v3.2.5
  • VSCode v1.88.1
    • Language Support for Java(TM) by Red Hat 1.30.0
    • Spring Boot Tools v1.53.0

Sample configuratin class:

@ConfigurationProperties(prefix = "demo")
public class RootConfig {
    private Map<String, ChildConfig> pathMap;
    // Getters and Setters...
}

public class ChildConfig {
    private String host;
    private int port;
    // Getters and Setters...
}

Key without escape works properly:
image

Key with escape provides no completion:
image

Requires one extra deeper indentation:
image

Completion provides no host, used in previous key:
image

Sample

https://github.com/musashi-miyamoto/sts4-configuration-issue-reproduce-sample

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions