Skip to content

New lsp-lens-place-position default is arguably surprising #3749

Open
@michaelpj

Description

@michaelpj

The LSP spec says nothing about where lenses are to be placed, which makes things tricky, however it's not uncommon for servers to assume that the behaviour is going to match VSCode, which places them above the line. This can matter, e.g. the Haskell server uses code lenses to display type signatures for functions that are missing them, and inserts them on click. Type signatures go above the declaration, not to the right, so putting the lens on the end of the line looks quite weird.

image

We've had a couple of users confused about this so far. It would be reasonable to say that the spec doesn't say where it should go, so you can't make any assumptions, but it seems to make lenses much harder to design, so 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions