-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misalignment with errors spanning multiple lines #12
Comments
I assumed this is the default behaviour from sideline. Sideline doesn't take multiple lines rendering into account since there is no space calculation on the newline (inside the overlay). 🤔 |
What do you suggest then? |
I can add offset to every line except the first line so they at least align along the overlay starting point. 🤔 WDYT? |
I don't think there is a good solution for rendering multiple lines on the sideline. I guess the best solution is the set |
Keeping everything aligned on the right would be an acceptable solution IMO, it's exactly what |
Thanks for the suggestion! I'll have to think about this. 🤔
Yes. You will need |
Thanks for your work on this. Is this still an option? I'm currently using the Metals lsp server for Scala and it just won't respect my configuration options to not use multi-line outputs. It would be nice if there was as fall back option to display multi-line outputs. I've currently monkey patched it to concat into a single line but I'm not experienced enough with overlays to provide a proper fix |
No, sorry. As I've explained above, there isn't an ideal solution for it, but I might implement the suggested solution (align to the right). However, I've been very busy recently, so it's probably not going to be implemented anytime soon. PRs are always welcome, though! |
Thanks for the very quick reply.
That would work just as well, I'm really only concerned by the jump from right aligned to left aligned. I could ofc configure flymake to be a left backend instead.
No worries at all, I took a rough crack at it tonight but didn't get anywhere. I'll have to do some more reading before I go again. I wouldn't hold your breath for a PR from me, though I might put on up eventually (after university exams) |
@jcs090218 I believe that this doesn't work when the
flymake
error takes multiple lines. Consider that I'm usingeglot
with thehaskell-language-server-wrapper
LSP server.In particular looking at the
sideline-flymake--show-errors
it seems that the candidates are always only one i.e. a string potentially containing multiple lines. And this implies thatsideline
shows things horizontally misaligned.Changing the last line of the function to
(funcall callback (split-string text "\n"))
seems to improve a bit the situation but the order is now wrong:Also notice that probably it would make sense removing all the whitespaces a the beginning of each line.
PS: this is my configuration
Haven't tried with
-Q
because I don't think this is due to other packages.The text was updated successfully, but these errors were encountered: