From 3e5a5dd621438cff4dbe29df227585b46ede7e44 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 26 Mar 2024 09:28:04 +0100 Subject: [PATCH] feat(python): allow configuring other python lsp servers than pyright, basedpyright --- lua/lazyvim/plugins/extras/lang/python.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 104b664b..c2843503 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -4,6 +4,8 @@ if lazyvim_docs then vim.g.lazyvim_python_lsp = "pyright" end +local lsp = vim.g.lazyvim_python_lsp or "pyright" + return { { "nvim-treesitter/nvim-treesitter", @@ -18,10 +20,13 @@ return { opts = { servers = { pyright = { - enabled = vim.g.lazyvim_python_lsp ~= "basedpyright", + enabled = lsp == "pyright", }, basedpyright = { - enabled = vim.g.lazyvim_python_lsp == "basedpyright", + enabled = lsp == "basedpyright", + }, + [lsp] = { + enabled = true, }, ruff_lsp = { keys = {