lsp-mode icon indicating copy to clipboard operation
lsp-mode copied to clipboard

Only show the first line of each code lens

Open quarkQuark opened this issue 2 years ago • 7 comments

Is there a way to only display the first line of a code lens? I find that having multiline lenses makes it much harder to navigate the file. Here's a screenshot showing particularly egregious example from Haskell:

2022-08-30_18-19

I'd love to be able to see something more like

myLayoutHool :: LayoutConfig ...

instead, so that I can tell at a glance that clicking the lens will add multiple lines, without having to scroll past all the lines if I choose not to click it.

quarkQuark avatar Aug 30 '22 17:08 quarkQuark

Can anyone crosscheck vscode's behavior?

yyoncho avatar Aug 30 '22 18:08 yyoncho

Looks exaggerated that lens from server BTW, really curious to see how other editors like vscode handles that

ericdallo avatar Aug 30 '22 23:08 ericdallo

Just changed clojure-lsp to return a huge string on lens, this is how it looks on emacs 2022-08-30_20-26

vscode 2022-08-30_20-29

So it seems vscode crops \n and have a length limit

ericdallo avatar Aug 30 '22 23:08 ericdallo

@ericdallo is there a way to see the whole content? I guess hovering? But we should do what vscode does here.

yyoncho avatar Aug 31 '22 06:08 yyoncho

(and in general sending these long lenses and then UI cropping them makes no sense because the user can hover the identifier either way)

yyoncho avatar Aug 31 '22 06:08 yyoncho

No @yyoncho, hover does nothing

ericdallo avatar Aug 31 '22 11:08 ericdallo

No @yyoncho, hover does nothing

so it is useless...

yyoncho avatar Aug 31 '22 12:08 yyoncho