-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter inlay hint separate from variable type inlay? #2876
Comments
Yes, we should split this into two options |
We should add appropriate option to config in |
We need to go deeper, to RA level otherwise RA will be computing all types of inlay hints anyway which might be suboptimal. On a server level, the hints have a kind: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/inlay_hints.rs#L15 The setting needs to be passed there, and the logic altered so that the unnecessary kinds of hints are not computed. |
@SomeoneToIgnore does it make sense to separate inlayHints request to inlayTypeHints and inlayParameterHints? Though if both of them are enabled we would need to make two passes or are type and parameter hints independent anyway? |
Exactly, so I would rather have a single request and a few |
I'll take a look into this one. |
Add setting to allow enabling either type inlay hints or parameter inlay hints or both. Group the the max inlay hint length option into the object. - Add a new type for the inlayHint options. - Add tests to ensure the inlays don't happen on the server side
Add setting to allow enabling either type inlay hints or parameter inlay hints or both. Group the the max inlay hint length option into the object. - Add a new type for the inlayHint options. - Add tests to ensure the inlays don't happen on the server side
3543: Parameter inlay hint separate from variable type inlay? #2876 r=matklad a=slyngbaek Add setting to allow enabling either type inlay hints or parameter inlay hints or both. Group the the max inlay hint length option into the object. - Add a new type for the inlayHint options. - Add tests to ensure the inlays don't happen on the server side Co-authored-by: Steffen Lyngbaek <steffenlyngbaek@gmail.com>
Add setting to allow enabling either type inlay hints or parameter inlay hints or both. Group the the max inlay hint length option into the object. - Add a new type for the inlayHint options. - Add tests to ensure the inlays don't happen on the server side
Would it be possible for these to be separate options? I'm not a big fan of the type inlays, I prefer hovering if I need them, but the recently added parameter name inlay is super nice
The text was updated successfully, but these errors were encountered: