emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

lsp-ui-sideline pop message break line on emacs 29.0.60 #746

Open liuchong opened 1 year ago

liuchong commented 1 year ago

The pop out alert message of lsp-ui-sideline added a line break, when move the cursor on and off the error code, the window will change. It's annoying, just disable lsp-ui-sideline-mode is ok, maybe. 🔥

Normal:

image

Normal in small window:

image

Broken in wide window:

image

Disabled:

image
Flinner commented 1 year ago

Is this unsolved? #96

liuchong commented 1 year ago

Is this unsolved? #96

I noticed that #96 is an old issue and seems was fixed, not sure if it is same problem as what I found, or maybe new version of emacs breaks it again? @Flinner The difference of my issue and #96 is that is the real message breaks line, but this is not real message but only a small word references does it.

ivan-avalos commented 1 year ago

I'm experiencing this too with Emacs 29.0.91. It makes writing code very annoying, especially with Dart, since Dart has labels at the end of every nested structure, and while typing, lines are constantly jumping as sideline actions appear and disappear.

Screenshot_20230528_224945

jcs090218 commented 1 year ago

I don't know if this will work, but you can try sideline and sideline-lsp. Pretty much the improved version of lsp-ui-sideline.

liuchong commented 1 year ago

There seems has similar problem in sideline-lsp, please check the below images:

Normal:

image

Sideline enabled:

image
liuchong commented 1 year ago

I think the prompt message on the right should not effect the display of source codes on the left.

jcs090218 commented 1 year ago

Thanks for testing it out! I will investigate the bug. ;)

liuchong commented 11 months ago

@jcs090218 hi, did you fixed it? 👀

jcs090218 commented 11 months ago

I have taken a closer look at the issue. It seems like it's a conflict with other overlays. 🤔

For [sideline-lsp](), you can try:

(setq sideline-backends-right-skip-current-line t)

There isn't a good solution yet since there isn't a good way to calculate all the overlays in the buffer/window. 😓

liuchong commented 11 months ago

Maybe create another layer on top of the editing buffer when popping out the message? @jcs090218 👀

jcs090218 commented 11 months ago

Maybe create another layer on top of the editing buffer when popping out the message?

No, we already have lsp-ui-doc that does that. I don't think that will solve the issue, but making it customizable might be one solution (use different frontend). 🤔