-
Notifications
You must be signed in to change notification settings - Fork 281
Open
Labels
language-serverIssues specific to our IDE integration rather than type checkingIssues specific to our IDE integration rather than type checkingneeds-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.An issue where it's not clear whether there is a bug or we are behaving as expected.
Milestone
Description
Describe the Bug
Pyrefly LSP integration with Neovim is not functioning correctly when working with large monorepo projects. Core LSP features like "Find References", "Rename Symbol", and file renaming with import updates are only partially working, significantly impacting development workflow in large codebases.
Environment
- Editor: Neovim
- LSP Client: nvim-lspconfig
- Pyright Version: 0.47.0
- Operating System: macOS Darwin 25.1.0
- Project Type: Large Django monorepo
- Project Size:
- ~13.7 million lines of Python code
- ~113,000 Python files
- ~143,000 total files
Current Behavior
-
Find References (
vim.lsp.buf.references()):- Only finds references in currently opened buffers
- Shows the definition location
- Misses references in unopened files throughout the codebase
-
Rename Symbol (
vim.lsp.buf.rename()):- Does not work
-
File Rename with Import Updates:
- Does not update import statements when renaming/moving files
- Import references remain pointing to old file paths
Expected Behavior
- Find References: Should discover ALL references across the entire project, regardless of whether files are open in buffers
- Rename Symbol: Should rename all occurrences project-wide, including in unopened files
- File Rename: Should automatically update all import statements that reference the renamed/moved file
Steps to Reproduce
- Clone a large Python monorepo
- Open Neovim with Pyrefly LSP configured
- Navigate to any function/class definition
- Try to find all references using LSP references command
- Observe that only references in open buffers are shown
- Try renaming a symbol that's used across multiple files (with most files closed)
- Observe that rename only affects open buffers
Additional Context
- This issue does NOT occur in smaller repositories - LSP features work as expected in smaller Python projects
- The project uses standard Python import patterns and Django structure
- The repository structure includes:
- Multiple Django apps
- Plugin architecture with client/territory specific code
- Extensive test suite
- Complex import hierarchy
- This issue does NOT occur with other LSPs - LSP features like find references or symbol renaming do work as expected.
Impact
This issue severely impacts developer productivity in large codebases, making refactoring operations risky and time-consuming as developers cannot rely on automated tools to find all usages or update references correctly.
Relevant conversation in Discord
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
language-serverIssues specific to our IDE integration rather than type checkingIssues specific to our IDE integration rather than type checkingneeds-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.An issue where it's not clear whether there is a bug or we are behaving as expected.