add venv selector

This commit is contained in:
Johannes Knopp
2024-12-21 23:51:06 +01:00
parent f7120df53b
commit d9ca06e58f
5 changed files with 77 additions and 29 deletions

View File

@ -85,16 +85,30 @@ return {
end,
['pyright'] = function()
lspconfig['pyright'].setup({
capabilities = capabilities,
cmd = { "pyright-langserver", "--stdio" },
filetypes = { "python" },
-- root_dir = function(filename)
-- return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename)
-- end,
settings = {
python = {
analysis = {
useLibraryCodeForTypes = true,
typeCheckingMode = "basic",
configPath = vim.fn.expand('./pyrightconfig.json')
autoSearchPaths = true,
diagnosticMode = "workspace",
useLibraryCodeForTypes = true
}
}
}
-- capabilities = capabilities,
-- settings = {
-- python = {
-- analysis = {
-- useLibraryCodeForTypes = true,
-- typeCheckingMode = "basic",
-- -- configPath = vim.fn.expand('./pyrightconfig.json')
-- }
-- }
-- },
})
end,
})