Skip to content

lazydev.nvim triggers vim.lsp.protocol deprecation warning on Neovim 0.12 #1670

@gitmpr

Description

@gitmpr

When using kickstart.nvim with Neovim 0.12, the following deprecation warning is triggered by the lazydev.nvim plugin:

client.notify is deprecated. Run ":checkhealth vim.deprecated" for more information

:checkhealth vim.deprecated

vim.deprecated:                                                           1 ⚠️

 ~
- ⚠️ WARNING client.notify is deprecated. Feature will be removed in Nvim 0.13
  - ADVICE:
    - use client:notify instead.
    - stack traceback:
        /home/mpr/.local/share/nvim/lazy/lazydev.nvim/lua/lazydev/lsp.lua:90
        /home/mpr/.local/share/nvim/lazy/lazydev.nvim/lua/lazydev/buf.lua:199
        vim/_editor.lua:0

This is due to a deprecation in Neovim’s LSP API, and it has been reported upstream in folke/lazydev.nvim#114. While there is a pull request open to fix it, it has been pending for some time.

Would it be possible to add a temporary workaround or patch in kickstart.nvim so that the default init.lua stays compatible with Neovim 0.12+ until the upstream fix is merged? This would help avoid onboarding friction for users on the latest version of Neovim.

A workaround might be to switch to this fork from the pull request which has the fix integrated, or perhaps configure a manual override. I pulled the pull request branch in with

~/.local/share/nvim/lazy/lazydev.nvim](main)$ git fetch origin pull/106/head:pr-106 && git checkout pr-106

And then update with :Lazy update
This wil also will get rid of the warning but will probably require manual set back eventually when Lazydev gets updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions