spring-projects / spring-projects/spring-tools

application.yml / properties: mark occurrences of ${} property references

Open
#459 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

theme: property-editing-support type: enhancement
Dominant language
Java
Stars
983
Forks
240
Avg merge
7d 1h
Merged PRs (30d)
7

Description

This a follow up ticket to https://github.com/spring-projects/sts4/issues/427

More specifically point number 1 for this comment:

https://github.com/spring-projects/sts4/issues/427#issuecomment-625378951

I beleave what is being asked for is a behavior similar to how Java language server implements 'mark occurrences' functionality when you select a variable name in the code.

I.e as show in screenshot below:

mark-occurences

However in our case it would instead do something similar when a property reference inside of a '${...}' is selected.

Example:

spring:
  application:
    name: foo
other:
   property: ${spring.application.name}

We place cursor inside the ${...} and it should mark 'name' as a 'occurrence'.

Since Java language server already does this, I think it shouldn't be too hard for us to do the same using existing LSP support.

Similar functionality could also be implemented for 'application.properties' as well.

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 by tracing the existing LSP mark-occurrences behavior and comparing it with the Java language server behavior described in the issue. Verify how application.yml property references are represented, then assess equivalent support for application.properties. Done means selecting a property inside ${...} marks the referenced property occurrence in both formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, yaml
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.