diff options
| author | Igor Soarez <igor@soarez.org> | 2026-10-12 16:33:58 +0100 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-12 16:33:58 +0100 |
| commit | 20b4e6a4f89776d1d0250d95cce341aa77d03da2 (patch) | |
| tree | 6222695f2a3669fba75be2035818c2655d10cebe /bin/macos-defaults-diff | |
| parent | b2246e1c3ac8419f3b1c84d557df8e926d451af2 (diff) | |
nvim: one pyright client per project, each on its own venv
pyright resolves one pythonPath per server instance, so in a monorepo with a
venv per service, every file was checked against whichever interpreter the
single client found. The root is now the nearest pyproject.toml, falling back
to the markers nvim-lspconfig uses, and the client points at the nearest .venv
at or above it -- a uv workspace's shared venv covers members without one.
The requested version set params.settings in before_init, which the
initialize request does not carry, and looked the venv up with vim.fs.find
on a name containing slashes, which 0.11 never matches and which searches
down the tree rather than up. Setting config.settings there works because
each client gets its own copy of the config and keeps that table as
client.settings.
Checked with the real config and pyright 1.1 on a mock workspace: a service
with its own venv, a member using the workspace's, a requirements.txt project
with none, and the workspace root each got their own client and interpreter,
and each file resolved only the module installed in its own venv.
From change request a48b26.
Diffstat (limited to 'bin/macos-defaults-diff')
0 files changed, 0 insertions, 0 deletions
