Skip to content
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

Show diagnostics for all lines in lsp-ui-sideline #777

Closed
zjp opened this issue May 6, 2024 · 5 comments
Closed

Show diagnostics for all lines in lsp-ui-sideline #777

zjp opened this issue May 6, 2024 · 5 comments

Comments

@zjp
Copy link

zjp commented May 6, 2024

I really like how neovim's lsp-ui package displays all diagnostics for all lines, and I'd like to see that behavior in lsp-ui-sideline. I'm halfway through hacking it into my local copy of lsp-ui, so I thought I'd open an issue here and see if this is something you'd be interested in supporting so I can either open a PR when it's done or reorganize my work around monkeypatching lsp-ui in my init config. Let me know!

@jcs090218
Copy link
Member

It depends on the implementation. I cannot guarantee this will be merged, but feel free to open PR so other maintainers can review it.

@rickalex21
Copy link

I too like the way neovim displays all diagnostics. Is there a way to view the doc all the time
without having to hover?

On neovim it's there all the time, on Emacs I have to put my cursor on it to see the warning
or error.

@zjp
Copy link
Author

zjp commented May 24, 2024

It depends on the implementation. I cannot guarantee this will be merged, but feel free to open PR so other maintainers can review it.

Sorry, I didn't mean to imply that my changes would just be accepted methodology and sight unseen and I can see how my post came off that way. I should have just actually stated what I was doing so I could get feedback on it as well, but I was trying to save everyone time and quickly check to see if the change would be directionally acceptable for the project or not. Sometimes proposals aren't, like gaps in i3!

My current idea is to check whether a new setting, lsp-ui-sideline--show-all-diagnostics, is t at the end of lsp-ui-sideline and if it is, call a new function, lsp-ui-sideline--run-all, which would loop over all flycheck errors on screen (not in the entire buffer), move the point to that line, and call lsp-ui-sideline--run on them.

One thing I'm stuck on right now is that it doesn't seem possible to give lsp-ui-sideline--find-line an offset that would make it place diagnostics on the same line as the point, and offset diagnostics on lines the point isn't on look a little ridiculous.

@wjoel
Copy link

wjoel commented Jul 13, 2024

I'm surprised this isn't already an option. It would be very much appreciated - let me know if I can help out by testing anything, @zjp.

Related to (I think?) #723.

@zjp
Copy link
Author

zjp commented Jul 19, 2024

Yes, that's exactly the feature I'm asking for. Sorry for making a duplicate ticket, I'll close this one and continue discussion there. If you'd like to see what I've done already, you can see my WIP at https://github.com/zjp/lsp-ui/tree/show-all-diagnostics

Current issues:

If you have hl-line mode on the hightlight disappears between the end of the line you're on and the diagnostic

If a line has multiple diagnostics to show, one diagnostic will be shown and the rest of the diagnostics disappear (you can see this in action by bringing line 372 of lsp-ui-sideline.el into view).

Not every motion seems to update the diagnostics.

@zjp zjp closed this as completed Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants