emacs-lsp / lsp-metals

lsp-mode :heart: metals
https://emacs-lsp.github.io/lsp-metals
GNU General Public License v3.0
58 stars 34 forks source link

Imenu provides too detailed leafs #95

Open kostafey opened 1 year ago

kostafey commented 1 year ago

After latest lsp update, Imenu provides too deep/detailed leafs. E.g. for the following Scala class I expect b and b2 as Imenu contents (classes and functions list, not function contents), but c and c2 actually appears.

class A {
    def b: Unit = {
        val c: Int = 0
    }

    def b2: Unit = {
        val c2: Int = 0
    }
}

image

How can I fix it?