Skip to content

Render end_of_line type hints without preceding colon #22305

@d3d9

Description

@d3d9

rust-analyzer.inlayHints.typeHints.location was added in #21322, the value "end_of_line" leads to the type hint being rendered at the end, including the initial colon unless rust-analyzer.inlayHints.renderColons is set to false. Example: #4318 (comment)

It would be great if there was a way to disable the colons just for the inlay hints at the end of the line, so you don't have to disable all colons if you don't like the ones for the end_of_line case.

Some users might prefer to have the colon be there (for example to avoid the hint looking like a method chaining hint), so I guess the current behaviour could be kept available or even as default.


Has been mentioned previously:

Maybe it will be kind of weird if the inlay hint is put at the end of the line and still started with ":", I think the text should also be modified with the change of placing way

Originally posted by @Decodetalkers in #21322 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions