Skip to content
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

An option to disable inlay Type hints for Closure parameters #15661

Closed
not-holar opened this issue Sep 24, 2023 · 3 comments · Fixed by #19104
Closed

An option to disable inlay Type hints for Closure parameters #15661

not-holar opened this issue Sep 24, 2023 · 3 comments · Fixed by #19104
Assignees
Labels
A-config configuration A-inlay-hints inlay/inline hints C-feature Category: feature request E-easy E-has-instructions Issue has some instructions and pointers to code to get started

Comments

@not-holar
Copy link

not-holar commented Sep 24, 2023

I can't be the only one for whom the Types of closure parameters in chains get pretty long, the line often overflows the screen and it starts to look very messy

I also like to have a low opacity for inlay hints, which works great for other hints, but makes the closures specifically look broken up and harder to follow

Since anonymous closures are usually very small and limited in scope, it's often obvious what the types are anyway, so i think letting the user decide where the Type hints appear more granularly would be very helpful

@not-holar not-holar added the C-feature Category: feature request label Sep 24, 2023
@butuzov
Copy link

butuzov commented Apr 5, 2024

You not the only one. Please add this configuration.

@Veykril Veykril added A-config configuration A-inlay-hints inlay/inline hints labels Apr 5, 2024
@Veykril
Copy link
Member

Veykril commented Jan 10, 2025

Relevant config is defined here

/// Whether to show inlay type hints for variables.
inlayHints_typeHints_enable: bool = true,
/// Whether to hide inlay type hints for `let` statements that initialize to a closure.
/// Only applies to closures with blocks, same as `#rust-analyzer.inlayHints.closureReturnTypeHints.enable#`.
inlayHints_typeHints_hideClosureInitialization: bool = false,
/// Whether to hide inlay type hints for constructors.
inlayHints_typeHints_hideNamedConstructor: bool = false,

Probably just needs a new hide* variant that gets threaded through like the others

@Veykril Veykril added E-easy E-has-instructions Issue has some instructions and pointers to code to get started labels Jan 10, 2025
@jnyfah
Copy link
Contributor

jnyfah commented Jan 30, 2025

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config configuration A-inlay-hints inlay/inline hints C-feature Category: feature request E-easy E-has-instructions Issue has some instructions and pointers to code to get started
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants