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

Add telecope-like list of lsp-diagnostics #1891

Closed
hirschenberger opened this issue Mar 30, 2022 · 8 comments · Fixed by #2013
Closed

Add telecope-like list of lsp-diagnostics #1891

hirschenberger opened this issue Mar 30, 2022 · 8 comments · Fixed by #2013
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@hirschenberger
Copy link
Contributor

In Lunarvim I love the feature to have a telescope list of lsp diagnostics (also clippy remarks) where I can simply skim through and fix issues here and there. (see screenshot)

image

@hirschenberger hirschenberger added the C-enhancement Category: Improvements label Mar 30, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Mar 30, 2022
@archseer archseer added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors labels Apr 1, 2022
@archseer
Copy link
Member

archseer commented Apr 1, 2022

Good idea, shouldn't be too hard to add either.

@hirschenberger
Copy link
Contributor Author

Maybe I try to implement it myself.
@archseer Can you maybe give me some hints how and where to start?

@archseer
Copy link
Member

archseer commented Apr 1, 2022

Take a look at how FilePicker is used in the code (it's just a picker with a file preview), i.e.

FilePicker::new(

A new command has to be added that builds a FilePicker from doc.diagnostics()

@hirschenberger
Copy link
Contributor Author

I'm working on it with hx. Nice way to learn the editor.

So I create two functions: diagnostics_picker and workspace_diagnostics_picker

@sudormrfbin
Copy link
Member

Does the LSP spec provide a way to get diagnostics for the whole workspace ?

@hirschenberger
Copy link
Contributor Author

LSP seems to send diagnostic messages for all file, hx just filters them on receive for open documents.

hirschenberger added a commit to hirschenberger/helix that referenced this issue Apr 7, 2022
archseer pushed a commit that referenced this issue Jun 30, 2022
* Add workspace and document diagnostics picker

fixes #1891

* Fix some of @archseer's annotations

* Add From<&Spans> impl for String

* More descriptive parameter names.

* Adding From<Cow<str>> impls for Span and Spans

* Add new keymap entries to docs

* Avoid some clones

* Fix api change

* Update helix-term/src/application.rs

Co-authored-by: Bjorn Ove Hay Andersen <[email protected]>

* Fix a clippy hint

* Sort diagnostics first by URL and then by severity.

* Sort diagnostics first by URL and then by severity.

* Ignore missing lsp severity entries

* Add truncated filepath

* Typo

* Strip cwd from paths and use url-path without schema

* Make tests a doctest

* Better variable names

Co-authored-by: Falco Hirschenberger <[email protected]>
Co-authored-by: Bjorn Ove Hay Andersen <[email protected]>
@noor-tg
Copy link

noor-tg commented Aug 14, 2022

hi, will this be added to 22.08 release ?

@the-mikedavis
Copy link
Member

Yep. Anything merged into master that hasn't since been reverted (nothing comes to mind) will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants