Skip to content

[bean completion proposals] completion proposals show up at higher priority than regular Java proposals #1505

Closed

Description

@martinlippert

In certain situations, bean completion proposals show up at a higher priority than regular Java completion proposals (even if the prefix doesn't really match) and therefore interfere with the regular Java completions in a horrible way. This was observed in Eclipse first, but the same problem happens in VSCode as well.

Example:

@Bean
public BeanOne beanOne() {
	BeanOne beanOne = new BeanOne();
	bean<*>
	return beanOne;
}

It is very likely that the user would like to auto-complete to beanOne from the line above and continue to use that, but the first completion that shows up is the option to auto-wire a bean with name beanOne.

The quick workaround is to disable the bean completion proposals in the preferences:

  • Eclipse: Preferences -> Spring -> Inject Bean completion proposals in Java editor
  • VSCode: Settings -> Preferences -> Spring Boot Tools -> Features -> Inject-Bean

Activity

  1. added
    for: vscode
    on Mar 14, 2025
  2. added this to the 4.29.1 milestone on Mar 16, 2025
  3. BoykoAlex commented on Mar 17, 2025

    @BoykoAlex
    Contributor

    Should be fixed with Boot LS and LSP4E changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

for: eclipsefor: vscodetheme: code completiontype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions