rust-lang / rust-mode

Emacs configuration for Rust
Apache License 2.0
1.1k stars 178 forks source link

imenu expression does not pick up async functions #396

Open john-consumable opened 4 years ago

john-consumable commented 4 years ago

Hi and thank you for rust mode! It works very well for the most part.

I was looking for a function with imenu the other day and realized it was not in the list because it was an async fn.

I thought I had a solution until i realized the regex used to construct the imenu expression is calculated.

I will look into a solution.

mookid commented 4 years ago

hello @john-consumable,

I tested with this file: https://raw.githubusercontent.com/CirnoV/awesome-core/0082f5d9588ba5e42760767411ec6a8815302ef0/src/web/graphql/schema/master.rs and saw no issue. Can you please provide an example of problematic source code?

john-consumable commented 4 years ago

Hmm. There might be an interaction on my side. I'm using counsel-imenu. Your example works for me out of the box but I have a file with functions that are not found.

mookid commented 4 years ago

I am using counsel-imenu too :) Please let me know if you can share an example.

john-consumable commented 4 years ago

Ok I will investigate further. I'm sorry I don't have a minimal example :(