Skip to content

LSP (Zed): Auto-import completions incomplete for symbols with common prefix #1398

@baab7

Description

@baab7

Describe the Bug

Summary

Completion filtering doesn't update when typing continues - shows only initially fetched results.

Description

When multiple classes start with the same prefix, Pyrefly's auto-import completions only show the results that were fetched first and don't continue fetching as more characters are typed.

MRE:

  1. Setup environment:
uv init --bare
uv add --dev pyrefly  
uvx pyrefly init

install pyrefly extension

  1. Create files with code

a.py:

class UsersManager:
    pass

b.py:

class UsersController:
    pass
    
# start typing UsersM here
  1. Start typing UsersM in b.py
  2. Only UsersController appears
  3. The UsersManager from a.py doesn't show up
Screen recording

Zed (what is actually) (appears only after manual trigger as write and delete backspace):

pyrefly.bug.mov

VS Code (what is expected):

VSCode.exptected.mov
LSP log

log.log

Original issue: zed-industries/zed#39945 (semi-fixed)

Related commit: aa33ce3

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

Zed: v0.209.6 (Zed)
OS: macOS 26.0.1
Memory: 16 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

Labels

codenavquestionFurther information is requested

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions