-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(lspinfo): replace :LspInfo with :checkhealth #3339
Conversation
It is definitely the direction to move forward. But the timing is not quite right. Because core checkhealth needs some improve. avoid some noisy issues, it's better after core checkhealth improved. |
which issues exactly should block this? |
the configured servers list and depreceted servers list is missing in checkhealth. may need an integration. |
? The code in this PR is the same as the old LspInfo implementation. So configured & deprecated should display, or there's a bug. |
lua/lspconfig/health.lua
Outdated
@@ -277,29 +254,7 @@ return function() | |||
vim.list_extend(buf_lines, { '', 'Deprecated servers: ' .. table.concat(deprecated_servers, ' ') }) |
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.
deprecated servers
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.
Oh yes. i didn't look at code carefully.
6201897
to
bc5ad09
Compare
Problem: :LspInfo has its own "inner platlform" of highlights, mappings etc. And it doesn't integrate with :checkhealth. Solution: - Move the lspinfo code to a healthcheck. - LspInfo features such as highlights, "floating window" presentation, etc., should be added to :checkhealth in Nvim core, if they are really needed. - Define a "q" mapping until Nvim stable has that in :checkhealth.
root_dir_not_found = 'Not found.', | ||
async_root_dir_function = 'Asynchronous root_dir functions are not supported in :LspInfo', | ||
async_root_dir_function = 'Asynchronous root_dir functions are not supported by `:checkhealth lspconfig`', |
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.
I need help with confirming that these messages still work correctly and are displayed nicely. Probably they should be converted to health.error()
calls.
any tips to restore the highlights? It's really hard to read the buffer returned by |
what highlights specifically |
This is how it works now. CheckHealth is displayed in the normal window. |
You still didn't mention which highlights. The door is open for adding features to |
deprecated since neovim/nvim-lspconfig#3339
removing the floating window option and moving to a checkhealth looks way worse. i get the idea of moving to |
I was using require('lspconfig.ui.windows').default_options.border = 'rounded' I prefer using the Anyone knows if there's another way to change this border? The default seems I also noticed that some configs in this repo still use this API, for example:
|
Thanks for mentioning that. Fixed in #3454
K is unrelated to this repo. This repo is just a collection of configs. K is a default mapping provided by Nvim core, which calls |
Problem:
:LspInfo has its own "inner platlform" of highlights, mappings etc. And it doesn't integrate with :checkhealth.
Solution:
Testing
Tested on Nvim HEAD and Nvim 0.10.
Todo (future)
>markdown
directive, or maybe just the formatting needs to be adjusted to satisfy vimdoc..../lspconfig/doc/configs.lua#<linenum>
URLs which the user can visit withgF
.