Skip to content

Omit inlay hints for function argument names when the input matches it #1514

@Gankra

Description

@Gankra

An IMO very nice feature of rust-analyzer is that it omits inlay hints of names when the thing being passed to the name matches:

Image

ty has no such mercy:

Image

I've found this sort of thing to be a surprisingly effective feedback mechanism for catching mistakes. If I see a call riddled with inlay hints for arguments it stands out that I might have mixed up arguments! Also in general it encourages my codebases to have consistent names for the same thing, which is a nice little virtuous nudge.

Metadata

Metadata

Assignees

Labels

serverRelated to the LSP server

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions