Skip to content

option "merge search results from the same line" is not effective on Scala + metaLS #729

Done

Description

@tribbloid

Image

here is a screenshot that illustrates the defect.

all "ArgNode" are from the same line, they should be merged.

I would also prefer that search result from both LSP and language plugin to be also merged

Activity

  1. angelozerr commented on Jan 8, 2025

    @angelozerr
    Contributor

    Indeed it should be nice but I fear that I will not have time to do that, any contribution are welcome!

  2. added
    enhancement
    on Jan 11, 2025
  3. lagergren commented on Nov 20, 2026

    @lagergren
    Collaborator

    @tribbloid does this still happen with 0.30.1? LSP4IJ's usages can be merged by line (they are UsageInfo2UsageAdapters), so it may depend on the view: does the screenshot show the Show Usages popup or the Find tool window?

  4. lagergren commented on Nov 24, 2026

    @lagergren
    Collaborator

    Answering my own question from the screenshot: it shows the Find tool window, grouped by usage type. The declaration on line 166 is reported three times, as a definition, as a reference and as a type definition, so it lands in three groups:

    • LSP4IJ asks for the references with includeDeclaration set, so the reference list repeats the declaration.
    • IntelliJ merges the usages of one line only within a group.

    Turning off Group by Usage Type should merge them. The fix in LSP4IJ is to skip a reference or a type definition whose range is that of a declaration or definition it already found.

  5. added 2 commits that reference this issue on Nov 24, 2026
    b24ac99
    913193a
  6. added a commit that references this issue on Nov 25, 2026
    3e24de8
  7. added this to the 0.30.2 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreferences

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions