-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 support for showing all LSPs in --health #7315
Conversation
Maybe it would be better then "all, some, none" to represent it will the symbol plus |
UpdateAs @gabydd suggested, I updated the code and now
I'm still not sure about the symbol for the yellow message, I don't like the hyphen very much. Maybe I could just use |
Should I also update the docs/wiki? |
Edit: Ah, thanks for the clarification @AlexanderBrevig |
They all run simultaneously. |
Perfect. I'm updating the wiki as soon as this pr gets merged. I haven't find any mention of the healthchecks inside the docs. |
Will it be possible to specify the languages to display as such: |
Well I don't think it would be difficult to implement, but I think it should be done in a different PR. Maybe if you open an issue, I could start to work on that! |
Better output (inspired by helix-editor#8156). Handle the case where no LSPs are configured.
Current output of
|
I'm not sure this is the best UI, it makes it look like I need to install all the servers where one should be enough. I'd maybe list the ones that were detected and then a number of those that weren't found. |
My first idea was actually to make something like:
But I though it would have been a little cumbersome to implement. Let me know if this may be a better solution to the problem. |
Displays all LSPs as a list in the table generated wih `--health languages`
Avoids some calls to .clone()
Technically, if there are multiple lsps configured this is exactly the case (I configured two more, now I have to see if helix sees them). That is unless and until multiple lsps are configured by default for a language specifically to provide fallbacks rather than expecting multiple to be required. In that case, the alternate UX @TheRealLorenz and I independently suggested is better. |
I think this PR should be included in the upcoming release, as it will be the first release with multiple LSP support. |
I've already implemented this (need to push it), I'm just looking for a feedback now |
That alternate UI looks clearer to me |
Pushed commits with the alternative UI and applied the requested changes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small style nit. I'm liking the way this is looking now 👍
I tested this, all seems great! Please try to merge it before the big new release as it will be very important to problem shoot the new multiple language server feature. |
* Add support for showing all LSPs in --health <lang> * Add support for showing all LSPs in --health languages * Use available/configured in --health languages * Apply @AlexanderBrevig suggestion in --health * Update `--health <language>` Better output (inspired by helix-editor#8156). Handle the case where no LSPs are configured. * Display all LSPs in `--health languages` instead of x/x Displays all LSPs as a list in the table generated wih `--health languages` * Make check_binary accept Optional references to str Avoids some calls to .clone() * Apply @the-mikedavis suggestions * Avoid useless collecting and cloning * Use for loop instead of .try_for_each()
* Add support for showing all LSPs in --health <lang> * Add support for showing all LSPs in --health languages * Use available/configured in --health languages * Apply @AlexanderBrevig suggestion in --health * Update `--health <language>` Better output (inspired by helix-editor#8156). Handle the case where no LSPs are configured. * Display all LSPs in `--health languages` instead of x/x Displays all LSPs as a list in the table generated wih `--health languages` * Make check_binary accept Optional references to str Avoids some calls to .clone() * Apply @the-mikedavis suggestions * Avoid useless collecting and cloning * Use for loop instead of .try_for_each()
* Add support for showing all LSPs in --health <lang> * Add support for showing all LSPs in --health languages * Use available/configured in --health languages * Apply @AlexanderBrevig suggestion in --health * Update `--health <language>` Better output (inspired by helix-editor#8156). Handle the case where no LSPs are configured. * Display all LSPs in `--health languages` instead of x/x Displays all LSPs as a list in the table generated wih `--health languages` * Make check_binary accept Optional references to str Avoids some calls to .clone() * Apply @the-mikedavis suggestions * Avoid useless collecting and cloning * Use for loop instead of .try_for_each()
* Add support for showing all LSPs in --health <lang> * Add support for showing all LSPs in --health languages * Use available/configured in --health languages * Apply @AlexanderBrevig suggestion in --health * Update `--health <language>` Better output (inspired by helix-editor#8156). Handle the case where no LSPs are configured. * Display all LSPs in `--health languages` instead of x/x Displays all LSPs as a list in the table generated wih `--health languages` * Make check_binary accept Optional references to str Avoids some calls to .clone() * Apply @the-mikedavis suggestions * Avoid useless collecting and cloning * Use for loop instead of .try_for_each()
Hi there, today I had to debug an lsp configuration with multiple servers and came across this missing feature.
I wrote a quick implementation for the
--health <language>
subcommand, but now I'm stuck at--health languages
.In my machine
--health languages
doesn't fully show lang-servers' names and if I were to print all names one after another it would be pretty useless.My idea was to check for the number of lang-servers and if there are more than one than the output could be something like (the names are pretty bad, I'm seeking better ideas):
Then for a more detailed output the user could use
--health <language>
.Otherwise we could show every lang-server name in a different line, but I think it could become a little cumbersome to implement.
Let me know your thoughts!