emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

Incorrect imenu display for some Rust enums #714

Closed gcohara closed 2 years ago

gcohara commented 2 years ago

With the following example code:

pub enum MyEnum {
    First{
        hiya: usize
    },
    Second,
    Third,
}

fn main() {
    println!("Hello, world!");
}

mod foo {
    struct bar {
        hello: usize
    }
}

lsp-ui-imenu-mode looks like this:

Screenshot 2022-05-27 at 13 54 31

I would expect the First variant to be below MyEnum, similar with bar and foo. Is it possible that imenu is struggling with double nested stuff?

I'm using lsp-ui version 8.0.0, Emacs 27.2, and rust-analyzer 2022-05-18 release