Skip to content

fix: ":checkhealth lspconfig" fails on Nvim 0.11 #3668

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

Merged
merged 1 commit into from
Mar 27, 2025
Merged

Conversation

justinmk
Copy link
Member

@justinmk justinmk commented Mar 27, 2025

Problem:
:checkhealth lspconfig fails:

E5009: Invalid $VIMRUNTIME: .../share/nvim/runtime
Error executing lua: Vim:E21: Cannot make changes, 'modifiable' is off
stack traceback:
        [C]: in function 'append'
        .../share/nvim/runtime/lua/vim/health.lua:443: in function '_check'

:checkhealth cannot call itself recursively. And even if it did work, it would show a duplicate report since :checkhealth vim.lsp will also be part of the report.

Solution:
On Nvim 0.11,

  • show a deprecation message if invoked directly.
  • show a softer message if invoked as part of the "full report".

fix #3664

@justinmk justinmk requested a review from glepnir as a code owner March 27, 2025 11:54
Problem:
`:checkhealth lspconfig` fails:

    E5009: Invalid $VIMRUNTIME: .../share/nvim/runtime
    Error executing lua: Vim:E21: Cannot make changes, 'modifiable' is off
    stack traceback:
            [C]: in function 'append'
            .../share/nvim/runtime/lua/vim/health.lua:443: in function '_check'

`:checkhealth` cannot call itself recursively. And even if it did work,
it would show a duplicate report since `:checkhealth vim.lsp` will also
be part of the report.

Solution:
On Nvim 0.11,
- show a deprecation message if invoked directly.
- show a softer message if invoked as part of the "full report".

fix #3664
@justinmk justinmk merged commit 85e0dd2 into master Mar 27, 2025
11 checks passed
@justinmk justinmk deleted the fixcheckhealth branch March 27, 2025 12:56
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

Successfully merging this pull request may close these issues.

checkhealth throws error on 0.11.0
1 participant