rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.19k stars 1.59k forks source link

Support copying the name of the item under the cursor #9880

Open EFanZh opened 3 years ago

EFanZh commented 3 years ago

Many functions, types, or static variables have a name that I can refer to, something like mod_1::Type2::function_3, etc. I hope rust-analyzer can support copying this name to the clipboard, so it is easy for users to refer to the corresponding items.

iago-lito commented 3 years ago

In my dream, the information would be abstract enough so that mod_1::Type2::function_3 becomes "one word" to vim and it can be worked over with every b, w, yiw, ciw.. motions, that'll feel awesome.

.. but maybe it'd need some new spec to LSP?