zed icon indicating copy to clipboard operation
zed copied to clipboard

show_completion_on_input either never triggers or *always* triggers

Open daturkel opened this issue 7 months ago • 1 comments

Summary

{
  "show_edit_predictions": false,
  "languages": {
    "Python": {
      "language_servers": ["pyright", "ruff"]
    }
  },
  "show_completions_on_input": false
}

With show_completion_on_input set to false, the only way to get completions is to manually trigger them with ctrl-space, which is a bit tedious. With show_completion_on_input set to true, completions trigger on every single character, which is extremely aggressive. I just want to get completions on my LSP's completion triggers, which in the case of pyright should be .. The issue I'm having here seems very similar to https://github.com/zed-industries/zed/issues/8766 but people in that thread reported it being fixed, while I'm still experiencing it in Zed 0.186.9 on macOS.

I'm fairly certain that this behavior is not deterministic either: it seemed to be working normally (only triggering on trigger characters) today with show_completions_on_input: true only triggering on periods, but now it does not. I have restarted my computer, reinstalled zed, deleted and redownloaded pyright, etc to no avail.

I'll add a note that the completions, when manually triggered by cmd-space, appear in a non-deterministic order: triggering completion, canceling out, and retriggering completion will show them in different orders. I would expect that the LSP would rank them somehow?

I have experienced the same behavior using pylsp instead of pyright, so I don't believe this is a pyright specific issue.

Description

I've included a gif here showing my configuration and how changing show_completion_on_input behaves unintuitively.

gif of behavior

Image

Expected behavior: one of the show_completion_on_input values should complete only on trigger characters as defined by the lsp

Actual Behavior: completion is triggered on either

Zed Version and System Specs

Zed: v0.186.9 (Zed) OS: macOS 15.2.0 Memory: 24 GiB Architecture: aarch64

daturkel avatar May 17 '25 16:05 daturkel

I am having the same issue. Completions that trigger when you just want to open a bracket like ( or { and press enter to go to the next line, for example when writing a function, are very annoying, so I turned them off. But I still want them when pressing . or @, etc.. Maybe we can either have a list of characters that are used to evaluate if completions should trigger or just make them a little less aggressive, so that it is actually possible to open a function body with {} and enter the next line without inserting a completion.

itpropro avatar May 29 '25 00:05 itpropro

I have the similar issue, when dart lsp config-ed, completions won't shows up when . pressed/key-in, but until I press any letter afterward.

(tried 0.199.9 don't have this issue)

ljcucc avatar Sep 19 '25 04:09 ljcucc

I have this problem as well. This is said to have been fixed before but evidently not. I should say I DO have show_completions_on_input set to true and I still experience this exactly as described.

Edit: And now it seems to have bizarrely gone away. Very odd.

Softwave avatar Oct 12 '25 11:10 Softwave

I also have this problem. 90% of the time it's not automatically showing up when I type ".", but sometimes it does until I restart Zed and then I have to trigger it manually again. Quite annoying.

I'm using Swift

SwiftedMind avatar Oct 18 '25 13:10 SwiftedMind

Sorry it took so long for us to reply! Is this fixed by #42398? (should land in stable in ~1 week)

HactarCE avatar Nov 14 '25 21:11 HactarCE