emacs-sideline / sideline

Show information on the side
GNU General Public License v3.0
118 stars 14 forks source link

the information insert lines #7

Closed bodnarlajos closed 1 year ago

bodnarlajos commented 1 year ago

Hi, first of all thanks for this mode! When I enable it the error infromation will insert lines to the code. In this case the information will push the original code down!

Can I do something with it ?

jcs090218 commented 1 year ago

It shouldn't be inserting anything. What is your config regarding this mode?

bodnarlajos commented 1 year ago

I just use with the default configuration. The backends are lsp and flymake.

jcs090218 commented 1 year ago

I don't think any of these backend will cause insertion. Can you provide a screenshot or gif? 😕

jcs090218 commented 1 year ago

Make sure you try it with emacs -q, may be there is something wrong with your configuration.

bodnarlajos commented 1 year ago

Here is two screenshot and I'll come back to you with the result of my testing ... https://imgur.com/a/QTFWkvf

thanks in advance

jcs090218 commented 1 year ago

Do you mean those red/green lines? It seems like the message from flymake is extremely long and contains newlines which cause one or more lines to be presented! This isn't a bug, but it could be very annoying...

bodnarlajos commented 1 year ago

Yes, I'was thinking about those lines. You can close this issue if you want, I just would have liked to mention it ... Thanks for you time :)

Yuanda-Dong commented 1 year ago

Hi, I had a similar issue, where the flycheck message contained newlines. I was able to format the error message by using "%.80s", so that it never exceeds 80 characters, but i don't think it's possible to strip newline characters using the format function. lsp-ui-sideline has a variable lsp-ui-sideline-diagnostic-max-lines that allows the user to choose the max number of lines. I'm new to writing Emacs lisp, but maybe allowing user to run a customizable function on the text itself would help, and make the functionalities more extensible.

image

Also i think it's best if they are aligned so how.

image

jcs090218 commented 1 year ago

I've implemented this feature, see backends' customization section:

jcs090218 commented 1 year ago

I think we've a solution? Closing this now! Thanks! ;)

bodnarlajos commented 1 year ago

Thanks! Very good news, I'll check it asap!