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

Cli command to show enabled lsps, other setup information #976

Closed
EpocSquadron opened this issue Nov 4, 2021 · 3 comments · Fixed by #1669
Closed

Cli command to show enabled lsps, other setup information #976

EpocSquadron opened this issue Nov 4, 2021 · 3 comments · Fixed by #1669
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@EpocSquadron
Copy link
Contributor

EpocSquadron commented Nov 4, 2021

One of the most common questions from people new to helix is how to get their LSP of choice functioning. This could mean how to enable a new one, enable one that is known to exist (rust-analyzer), or whether or not one exists. Answers to these related questions are scattered among the wiki, the documentation, in people's heads, and through the use of hx -v to look for lsp related log lines.

In wezterm, a similar issue was occurring with questions about font fallbacks, which lead to the introduction of commands to show the list of available fonts and the fonts used for a passed string. This has greatly reduced the confusion and time spent answering that sort of question, and enabled people to mostly self service to resolve font related issues.

I propose we do something similar for helix in regards to lsp diagnostics. Imagine the following command and it's output.

$ hx --lsp-diag
Language    Name           Extensions  Detected  Path                     User Configured
rust        rust-analyzer  rs          yes       /usr/bin/rust-analyzer   no
C++         clangd         cpp,h       no        -                        no
foo         foolsp         foo         yes       ~/.local/bin/foolsp      yes
...

If you don't see your desired language server listed above, you need
to specify it within your languages.toml. If it shows up, but it's not
detected, ensure it is installed and in your $PATH. If it is detected
but not working, start helix with -v and indirect the log for lines
related to lsp. For further troubleshooting see the docs <link>.


The actual text to be cleaned up.

This could also be something inside the editor, but I think a cli flag is cleaner and easier for first implementation.

@EpocSquadron EpocSquadron added the C-enhancement Category: Improvements label Nov 4, 2021
@EpocSquadron
Copy link
Contributor Author

Thinking about this further, it might be cool to generalize this to refer to language support in general, and show a column on whether tree-sitter is enabled and what features it has (indents, highlights, injections, etc). Or maybe that's a separate command.

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Nov 5, 2021
@archseer
Copy link
Member

archseer commented Nov 8, 2021

This would be great as a diagnostic to address common issues that pop up!

@pickfire
Copy link
Contributor

I guess it's something like neovim :checkhealth or doctor.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants