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

Autocomplete completions are cut in half #8126

Open
Belluxx opened this issue Feb 21, 2024 · 8 comments
Open

Autocomplete completions are cut in half #8126

Belluxx opened this issue Feb 21, 2024 · 8 comments
Labels
needs-repro Needs reproduction steps / someone to reproduce popovers Feedback for tooltips, syntax hints, info popups, toasts, etc python Python programming language support

Comments

@Belluxx
Copy link

Belluxx commented Feb 21, 2024

Summary

Long LSP completion suggestions can be cut in half.

Describe the bug / provide steps to reproduce it

Description: the entries of the auto-completion dialog are often cut in half.
Steps to reproduce: write a piece of code and wait for the autocompletions to appear. You will see that initially the text is not cut in half but after some milliseconds the right-side type-predictions (in grey color) appear overlapping the left side.

Environment

OS: MacOS 14.3.1 (23D60)
SoC: M1 8GB
Zed version: 0.122.2

Screenshot

issue

@Belluxx

This comment has been minimized.

@JosephTLyons JosephTLyons added popovers Feedback for tooltips, syntax hints, info popups, toasts, etc and removed triage labels Feb 23, 2024
@effdotsh

This comment has been minimized.

@effdotsh
Copy link
Contributor

effdotsh commented Feb 23, 2024

The delay before the right half entering is dictated by completion_documentation_secondary_query_debounce, which is set to 300ms by default. My experience was much smoother when I set it to 0. Is there a solid justification for this being a non-zero value by default?

For the cut-off text, I'm planning on just adding ellipses when it gets truncated, like how vscode does it:
image

@Belluxx
Copy link
Author

Belluxx commented Feb 24, 2024

@effdotsh Thank you for providing a fix so quickly

@JosephTLyons JosephTLyons added python Python programming language support language An umbrella label for all programming languages syntax behaviors labels Mar 5, 2024
ConradIrwin added a commit that referenced this issue Apr 1, 2024
Release Notes:

- Fixed LSP completions being cut in half
([#8126](#8126)).

Previously, autocomplete suggestions were covered by autocomplete
documentation, which only appeared after a short delay.

Now, when an autocomplete suggestion is too long to fit, the name is
truncated with ellipses like how VSCode does it:

![image](https://github.com/zed-industries/zed/assets/50590465/bf3c6271-7d7a-44b1-ab76-647df5620fcd)

Additionally `completion_documentation_secondary_query_debounce`'s
default was changed from 300ms to 0ms, which makes the editor feel
significantly faster (in my opinion).

Before:


https://github.com/zed-industries/zed/assets/50590465/6443670b-fe25-4428-9a39-54405d9a7cec

After:


https://github.com/zed-industries/zed/assets/50590465/72572487-3eb4-4a96-a2f9-608e563a1f05

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
@github-actions github-actions bot added the stale Label used by `stale` action label Sep 24, 2024
@evtn

This comment has been minimized.

@Belluxx

This comment has been minimized.

@github-actions github-actions bot removed the stale Label used by `stale` action label Oct 1, 2024
@github-actions github-actions bot added the stale Label used by `stale` action label Feb 4, 2025
@willlma
Copy link

willlma commented Feb 4, 2025

This is still an issue for me. I can't see the full definition.
Image

@github-actions github-actions bot removed the stale Label used by `stale` action label Feb 11, 2025
@zed-industries zed-industries deleted a comment from github-actions bot Feb 26, 2025
@zed-industries zed-industries deleted a comment from github-actions bot Feb 26, 2025
@notpeter
Copy link
Member

@willlma Can you you (or anyone else) provide a minimal repo and Zed settings that reproduces this issue? I'd like to see if we can't get this sorted.

@notpeter notpeter added needs-repro Needs reproduction steps / someone to reproduce and removed bug [core label] language An umbrella label for all programming languages syntax behaviors labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-repro Needs reproduction steps / someone to reproduce popovers Feedback for tooltips, syntax hints, info popups, toasts, etc python Python programming language support
Projects
No open projects
Archived in project
Status: No status
Development

Successfully merging a pull request may close this issue.

6 participants