Skip to content

basedpyright: unregistered workspace/DidChangeWatchedFiles capability #42147

@dargor

Description

@dargor

Summary

basedpyright miss changes while editing (not saving) open files

Description

Say we have two files app.py and settings.py opened in Zed, settings being used (imported) by app.

Previously when changing settings (for example deleting a line containing a constant used elsewhere) Zed would highlight the error in the other file directly.

Now it does not, instead I see this in logs during my tests :

2025-11-06T23:18:25+01:00 INFO  [project::lsp_store] language server 5: unregistered workspace/DidChangeWatchedFiles capability with id adec8d83-e4e2-47e9-b46d-c8a6d664d06b
2025-11-06T23:19:04+01:00 INFO  [project::lsp_store] language server 5: unregistered workspace/DidChangeWatchedFiles capability with id 5bcbd6dd-4e93-4062-a316-d8a8d6663a6c
2025-11-06T23:19:04+01:00 INFO  [project::lsp_store] language server 5: unregistered workspace/DidChangeWatchedFiles capability with id 9f8e7d79-8a6c-4a19-948f-901b958aa8ef

I don't know if it is related, but sounds like it is.

From my settings.json :

  "lsp": {
    "basedpyright": {
      "settings": {
        "basedpyright.analysis": {
          "diagnosticMode": "openFilesOnly",
          "typeCheckingMode": "strict"
        }
      }
    }
  }

Checked VS Code behaviour, which is correct with the same settings.

If I switch to workspace mode, basedpyright works but is very slow and memory hungry.

I'm pretty sure it worked in the previous stable release (aka, this started with 0.211.x).

Steps to reproduce:

  1. open two (or more) python files from the same project
  2. change something (a constant, variable, class, function...) used in another open file
  3. diagnostics are only updated in the current file, not the other opened files

Expected Behavior: diagnostics are properly updated for each opened file
Actual Behavior: diagnostics are only updated for the current file

Zed Version and System Specs

Zed: v0.211.6 (Zed)
OS: macOS 15.7.2
Memory: 36 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:languages/pythonPython programming language supportfrequency:alwaysBug that happens for everyone on every platform no matter how they use Zedpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:needs reproNeeds reproduction steps / someone to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions