Return a user-friendly class name for display in completion item details. Anonymous classes have synthetic names like `__anonymous@156` which are meaningless to the user. This replaces them with `"anonymous class"`.
(name: &str)
| 30 | /// Anonymous classes have synthetic names like `__anonymous@156` which are |
| 31 | /// meaningless to the user. This replaces them with `"anonymous class"`. |
| 32 | fn display_class_name(name: &str) -> &str { |
| 33 | if name.starts_with("__anonymous@") { |
| 34 | "anonymous class" |
| 35 | } else { |
| 36 | name |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /// Build an LSP snippet string for a callable (function, method, or constructor). |
| 41 | /// |
no outgoing calls
no test coverage detected