Skip to content

Update Neovim config examples to use vim.lsp.config#24577

Merged
dhruvmanila merged 5 commits intoastral-sh:mainfrom
benberryallwood:main
Apr 13, 2026
Merged

Update Neovim config examples to use vim.lsp.config#24577
dhruvmanila merged 5 commits intoastral-sh:mainfrom
benberryallwood:main

Conversation

@benberryallwood
Copy link
Copy Markdown
Contributor

@benberryallwood benberryallwood commented Apr 12, 2026

Summary

Neovim 0.11 (in March 2025) added vim.lsp.config() which is now the recommended way to set up language servers. This was added to the Ruff docs in #18108 in addition to the legacy method using nvim-lspconfig.

Calling nvim-lspconfig to configure a language server is deprecated - see their documentation.

This PR:

  • updates the documentation which describes both methods to now prefer vim.lsp.config
  • updates all other examples which only show the legacy method to now use vim.lsp.config.

Test Plan

I have tested a subset of the examples locally using Neovim 0.12.1.


I considered just removing the legacy method but was unsure. I'll follow others' guidance on when that should be kept until.

Screen.Recording.2026-04-13.at.13.09.19.mov

@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label Apr 13, 2026
Updated Neovim setup instructions for Ruff Language Server to clarify usage with built-in LSP client and nvim-lspconfig for different Neovim versions.
Updated configuration for the Ruff language server in Neovim to include additional root markers.
Corrected formatting of links in Neovim setup documentation.
@dhruvmanila dhruvmanila changed the title docs: Update Neovim config examples to use vim.lsp.config Update Neovim config examples to use vim.lsp.config Apr 13, 2026
@dhruvmanila dhruvmanila enabled auto-merge (squash) April 13, 2026 07:43
@dhruvmanila dhruvmanila merged commit 8d0cdb3 into astral-sh:main Apr 13, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants