Rust-analyzer: Add CodeLens for references

Created on 21 Aug 2020  路  1Comment  路  Source: rust-analyzer/rust-analyzer

Currently, the only CodeLenses that rust-analyzer shows are Run above fn main(), Run Test | Debug above tests, and n implementations above struct, enum, union and trait definitions. A useful addition to this would be a CodeLens of the form n references above definitions where this makes sense. When clicked, this CodeLens would show all the references to the symbol the definition defines.

Here鈥檚 a list of some possible definitions above which the references CodeLens could be shown:

  • structs
  • enums
  • unions
  • traits
  • free functions
  • functions in impl blocks
  • functions in trait definitions

It _might_ be a good idea to show the CodeLens above enum variant definitions as well as struct and union field definitions, but that might be a bit much.

S-actionable

Most helpful comment

I'm working on it.

>All comments

I'm working on it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Matelasse picture Matelasse  路  3Comments

cole-miller picture cole-miller  路  3Comments

matklad picture matklad  路  4Comments

matklad picture matklad  路  3Comments

matklad picture matklad  路  4Comments