haskell / haskell/haskell-language-server

Code lenses that show type signatures should be inlay hints instead

Open
#3,254 2 comments 5 reactions 0 assignees View on GitHub
status: in discussion type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

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 (https://github.com/emacs-lsp/lsp-mode/issues/3749). I made an issue in the spec repo (https://github.com/microsoft/language-server-protocol/issues/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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.