[BUG] LSP hover and documentSymbol operations return empty results while diagnostics work correctly (Python/Pyright)

Resolved 💬 3 comments Opened Jan 13, 2026 by sasha01zuev Closed Feb 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

LSP operations hover and documentSymbol return empty results, while diagnostics work correctly. This suggests the LSP server (Pyright) is running and analyzing files, but interactive operations are not functioning.

Tested in multiple terminals with the same result:

  • PowerShell
  • PyCharm Extension (PowerShell)
  • Windows Terminal

Observed behavior:

  1. Diagnostics - Working correctly. Pyright reports errors like reportMissingImports in the LSP output.
  1. Hover - Returns: "No hover information available. This may occur if the cursor is not on a symbol, or if the LSP server has not fully indexed the file."
  1. documentSymbol - Returns: "No symbols found in document. This may occur if the file is empty, not supported by the LSP server, or if the server has not fully indexed the file."

Example LSP hover call:

LSP operation: hover
File: src/my_module.py
Line: 25
Character: 10

Result:

No hover information available. This may occur if the cursor is not on a symbol, or if the LSP server has not fully indexed the file.

But diagnostics show (proving Pyright is running):

✘ [Line 1:6] Import "my_package.some_module" could not be resolved [reportMissingImports] (Pyright)
✘ [Line 2:6] Import "config.settings" could not be resolved [reportMissingImports] (Pyright)

What Should Happen?

When running LSP hover on a valid symbol (function definition, variable, etc.), it should return:

  • Type information
  • Documentation/docstring
  • Function signature

When running documentSymbol, it should return a list of all symbols (classes, functions, variables) in the file.

Error Messages/Logs

No hover information available. This may occur if the cursor is not on a symbol, or if the LSP server has not fully indexed the file.

Steps to Reproduce

  1. Install the official pyright-lsp plugin from Claude Code marketplace
  2. Install Pyright both ways:
  • npm install -g pyright
  • pip install pyright
  1. Create pyrightconfig.json in the project root with basic configuration
  2. Restart Claude Code
  3. Try various LSP operations on Python files:
  • hover - returns "No hover information available"
  • documentSymbol - returns "No symbols found in document"
  • goToDefinition - returns empty result
  1. Note: Pyright diagnostics DO appear in the output (e.g., reportMissingImports errors), proving the LSP server is running and analyzing files
  2. Tested on multiple Python files including standard library imports like asyncio - same result

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

-

Claude Code Version

2.1.6

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

pyrightconfig.json:
```json
{
"include": ["src", "tests"],
"exclude": ["**/__pycache__", ".venv"],
"extraPaths": ["."],
"venvPath": ".",
"venv": ".venv",
"pythonVersion": "3.13",
"typeCheckingMode": "basic"
}


  Environment:
  - Node.js installed
  - Pyright installed via both npm install -g pyright and pip install pyright
  - Python 3.13

  Related Issues:
  - #16360 - C# LSP not working, all operations return empty

  The partial functionality (diagnostics work, interactive operations don't) suggests LSP may be running in a "diagnostics-only" mode.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗