Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP error: Received redundant open text document command for file #25256

Open
failable opened this issue Feb 20, 2025 · 0 comments
Open

LSP error: Received redundant open text document command for file #25256

failable opened this issue Feb 20, 2025 · 0 comments

Comments

@failable
Copy link

Summary

Every time I open a Python file, I get this error. The LSP functionality is fine but the error is just annoying. The issue did not exist before until a recent update.

Image

Zed config

"languages": {
    "Python": {
      "language_servers": ["basedpyright", "ruff", "!pyright"],
      "format_on_save": "on",
      "formatter": [
        {
          "code_actions": {
            "source.organizeImports.ruff": true,
            "source.fixAll.ruff": true
          }
        },
        {
          "language_server": {
            "name": "ruff"
          }
        }
      ]
    }
  }

LSP logs in Zed

basedpyright language server 1.1.394 starting
Server root directory: file:///Users/maximin/.local/share/uv/tools/basedpyright/lib/python3.12/site-packages/basedpyright/dist
Starting service instance ""
Loading configuration file at /Users/maximin/git/work/project/hawk/pyrightconfig.json
No include entries specified; assuming /Users/maximin/git/work/project/hawk
Auto-excluding **/node_modules
Auto-excluding **/__pycache__
Auto-excluding **/.*
Assuming Python version 3.12.8.final.0
Found 28 source files
Received redundant open text document command for file:///Users/maximin/git/work/project/hawk/src/hawk/apps/meituan/platforms/macos.py
Received redundant open text document command for file:///Users/maximin/git/work/project/hawk/src/hawk/apps/meituan/platforms/macos.py
Received redundant open text document command for file:///Users/maximin/git/work/project/hawk/src/hawk/scripts/server.py

basedpyright version

basedpyright 1.27.1
based on pyright 1.1.394

Steps to trigger the problem:

  1. Install basedpyright extension.
  2. Run uv init project.
  3. Run zed project.
  4. Use the file picker to open main.py.
  5. Close the main.py file.
  6. Use the file picker to open main.py again.

Actual Behavior:

An error is shown.

Expected Behavior:

No error should be shown.

Zed Version and System Specs

Zed: v0.175.1 (Zed Preview)
OS: macOS 15.3.1
Memory: 64 GiB
Architecture: aarch64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant