feat(python): allow configuring other python lsp servers than pyright, basedpyright

This commit is contained in:
Folke Lemaitre 2024-03-26 09:28:04 +01:00
parent 9e07a6615a
commit 3e5a5dd621
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -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 = {