Skip to content

Migrate to vim.lsp.config (non-breaking) #3494

@justinmk

Description

@justinmk

Description

With vim.lsp.config neovim/neovim#31031 , Nvim 0.11+ now has an interface for defining LSP configs. Previously, the config format was defined by nvim-lspconfig (this repo) and did not have core Nvim support.

Migration plan

✅ Phase 1: Nvim 0.11 users can use these configs via vim.lsp.config

  1. Create lsp/*.lua configs (in this repo) that simply wrap the existing lua/lspconfig/configs/*.lua configs.
    • Ignore root_dir? Copy-paste filenames into root_markers?
  2. Upstream relevant parts of the healthcheck.
    • On Nvim 0.11 lspconfig/health.lua should do nothing (or error). On Nvim 0.10 it will continue to work.
  3. Nvim 0.11+ can use nvim-lspconfigs like this:
    vim.lsp.config('foo')
  4. Nvim 0.11+ users no longer need to (directly) call require('lspconfig') for any reason.

✅ Phase 2: migrate the actual config code

  1. Tag a v1.x release.
  2. BREAKING: The master branch will require Nvim 0.11 and will throw an error if vim.lsp.config is not found (and point the user to the v1.x branch).
  3. Keep the old configs on master, but document that they are frozen and won't be supported.
  4. If Nvim 0.10 or older is detected, use the old frozen configs
  5. Update the README to mention that old configs are frozen.
  6. Copy all configs to lsp/*.lua and port them to vim.lsp.config

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions