Restrict "Find All References" to variant constructions #20094
-
Today, if you hover over an enum variant and click "Find All References", the results will include patterns in Is there a way to restrict the results to only places where the variant is constructed? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
No. The problem is that the LSP spec does not have the possibility to filter on this (we can have an extension with a custom command, though). |
Beta Was this translation helpful? Give feedback.
-
There's a way you can do so for variants with fields, like enum E {
Foo$(i32),
Bar${ x: bool },
Baz, // You cannot do so with this variant
} triggering "go to definition" - iirc, the default keybinding is You can do the similar thing for the structs with fields. |
Beta Was this translation helpful? Give feedback.
No. The problem is that the LSP spec does not have the possibility to filter on this (we can have an extension with a custom command, though).