#66339

Autocomplete is truncated when type is too long

Openthe2nakeopened 14h ago

Reproduction steps

  1. In C++, add a type with a very long type and name.
  2. Autocomplete the type by pressing Ctrl+Space

Current vs. Expected behavior

Current behaviour: the text is truncated, possibly making autocomplete useless if more than one entry has the same prefix.

Expected behavior: the currently highlighted entry is wrapped to take as many lines as necessary.

Zed version and system specs

Zed: v1.26.2+stable (Zed) OS: Linux Wayland cachyos Memory: 23.2 GiB Architecture: x86_64 GPU: AMD Radeon 890M Graphics (RADV STRIX1) || radv || Mesa 26.2.5-arch3.1

Attach Zed log file

Zed.log
undefined

Relevant Zed settings

settings.json
undefined

Relevant Keymap

keymap.json
undefined

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

No response

Activity

3
zed-community-bot[bot]14h ago

This issue appears to be a duplicate of:

  • #17270

If this is indeed a duplicate: Please close this issue and subscribe to the linked issue for updates (select "Close as not planned" → "Duplicate")

If this is a different issue: No action needed. A maintainer will review this shortly.

Why were these issues selected?

#17270: Both issues describe the same problem: LSP autocomplete entries with long type definitions (specifically C/C++ with clangd) are truncated in the completion menu, making them unhelpful. The new issue shows a screenshot of truncated C++ type completions; issue #17270 explicitly describes the same with C function pointers and includes a screenshot of the same truncation behavior. The root cause is the same: Zed's completion list limits the displayed length of suggestions.

Shared root cause: Zed's completion menu truncates long LSP suggestion labels/type annotations instead of wrapping or expanding them, making completions with long type signatures unreadable.

Additional recent context for triagers

Possibly related open issues:

  • #21403 — Issue #21403 proposes switching completions from uniform_list to list to allow dynamic sizing of list elements, explicitly citing the problem of multiline/long completion entries being displayed incorrectly. The new issue requests wrapping of long entries — the same underlying rendering limitation. The root cause (uniform_list enforcing fixed-height rows) would explain both issues.
    • Possible shared root cause: The completion menu uses a uniform_list with fixed row height, which truncates long type annotations instead of wrapping them across multiple lines.

This is an automated analysis and might be incorrect.

the2nake14h ago

Duplicate that wasn't found (didn't search LSP)

the2nake13h ago

This was not actually a duplicate, #17270 concerns specifically the LSP output, but this is about truncation itself.