From 8748b66344f9b71bc2423192e5d7451727e76196 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 6 Jun 2024 16:14:09 +0200 Subject: [PATCH] nvim: Switch python lsp to basedpyright Switched pyright to basedpyright as it adds a couple noteworthy rules and some functions that are otherwise exlusive to pylance. Especially useful for me are semantic highlighting as well as inlay hints (now that nvim supports it from 0.10 onwards). --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index 3138473..aa63460 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -33,7 +33,7 @@ local servers = { marksman = { filetypes = { "markdown", "quarto" }, }, - pyright = {}, + basedpyright = {}, ruff_lsp = {}, serve_d = {}, tailwindcss = {}, @@ -162,7 +162,7 @@ lspconfig.nushell.setup({}) local python_path -- ensure python virtualenv is determined automatically on lsp start -lspconfig.pyright.setup({ +lspconfig.basedpyright.setup({ on_attach = function(client, bufnr) if python_path == nil then python_path, _ = require("core.util").get_python_venv(client.config.root_dir)