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).
This commit is contained in:
Marty Oehme 2024-06-06 16:14:09 +02:00
parent 4697e09472
commit 8748b66344
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -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)