From 1a7ce2f1be8ddd43446331fe139e72bf5b4b964a Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Thu, 25 Jun 2026 15:45:27 -0500 Subject: [PATCH] refactor(nvim): migrate LSP configuration to vim.lsp API - Update `lsp.lua` to replace deprecated `lspconfig` setup calls with the modern `vim.lsp.config` and `vim.lsp.enable` API. - Maintain Ruff/Pyright hover capabilities by ensuring `on_attatch` logic remains within the new config block. Rationale: Adopting the native Neovim 0.11+ LSP API now prepares the configuration for the upcoming `nvim-lspconfig` v3.0.0 release and reduces external plugin reliance. --- modules/user/config/nvim/lsp.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/user/config/nvim/lsp.lua b/modules/user/config/nvim/lsp.lua index 8affa30..08d067e 100644 --- a/modules/user/config/nvim/lsp.lua +++ b/modules/user/config/nvim/lsp.lua @@ -1,15 +1,15 @@ -local lspconfig = require('lspconfig') - -- Python LSP: Pyright (Type checking and navigation) -lspconfig.pyright.setup{} +vim.lsp.config('pyright', {}) +vim.lsp.enable('pyright') -- Python LSP: Ruff (Ultra-fast Linting and Auto-formatting) -lspconfig.ruff.setup{ +vim.lsp.config('ruff', { on_attach = function(client, bufnr) -- Disable hover provider in Ruff so it doesn't conflict with Pyright client.server_capabilities.hoverProvider = false end, -} +}) +vim.lsp.enable('ruff') -- Configure LSP Keybindings on attach vim.api.nvim_create_autocmd('LspAttach', {