Skip to content

Code lenses that show type signatures should be inlay hints instead #3254

Open
@michaelpj

Description

@michaelpj

Prompted by an issue with lsp-mode where they started showing code lenses at the end of the line instead of above the line by default (emacs-lsp/lsp-mode#3749). I made an issue in the spec repo (microsoft/language-server-protocol#1558) to ask whether clients can make any assumptions about where code lenses are displayed.

The answer seems to be no, we should not make assumptions about where code lenses are displayed. That means that the way we're using them to display type signatures is fundamentally unreliable. Fortunately, there is a feature that does allow specific placement of something in the buffer: inlay hints.

So I think the "right thing" here is to convert the code lenses that display type signatures into inlay hints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in discussionNot actionable, because discussion is still ongoing or there's no decision yettype: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions