-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Suggest autocomplete options immediately after inserting a period #8766
Comments
I'm working in a TS codebase and the behaviour I'm seeing is the suggestion popover appears after showing the intent of accessing a property: inserting a period. The only time it doesn't pop up is when some code is suggested by Copilot. zed-popover-intent.mp4 |
@Moshyfawn, do you have any particular configuration? I haven't changed anything, it is the default installation. Thank you. |
This has been the case with every configuration I've tried. My current settings are as follows: {
"theme": "Rosé Pine",
"ui_font_size": 14,
"buffer_font_size": 14,
"tab_size": 2,
"show_wrap_guides": true,
"format_on_save": "language_server",
"scrollbar": {
"git_diff": false
},
"git": {
"git_gutter": "tracked_files"
}
} |
I believe the difference in the behavior you're seeing is due to corresponding language server's Here are the only places in Zed codebase we register those trigger characters: zed/crates/project/src/project.rs Lines 2086 to 2096 in 7ad7143
zed/crates/project/src/project.rs Lines 3342 to 3352 in 7ad7143
So, while Zed can add some heuristics to trigger more completions, a more appropriate fix seems to belong to corresponding language servers. |
Hm, the problem is: seems that all 3 mentioned servers do have
So maybe it's Zed's issue, after all: but still, to debug this, one would need to find a case where it reproduces reliably, then
|
PS. I do not have Copilot, but when I had, I had the same behavior. |
I would really appreciate if somebody can provide the issue with an open source project and the repro steps; or, alternatively if somebody could debug those things locally in the places mentioned above and add more context. |
I can provide tomorrow. It basically does not work in any project to me.I do not have anything on my config and I have installed using homebrew.On 3 Mar 2024, at 14:49, Kirill Bulatov ***@***.***> wrote:
I would really appreciate if somebody can provide the issue with an open source project and the repro steps; or, alternatively if somebody could debug those things locally in the places mentioned above and add more context.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I use asdf to install the languages that I want use, in this case, NodeJS 18.x The exactly same setup works for VSCode. |
Sometimes works as expected, other no. I have no idea…
|
Experiencing the same exact issue here with my TypeScript project. I absolutely need an autocomplete list after pressing Edit: I restarted Zed and now it's working after pressing period? Seems inconsistent. Also worth noting that when I try to autocomplete a method, I'm not getting Back to using WebStorm for now. |
I'm experiencing an issue with autocompletion when Copilot is enabled. Most of the time I see a list of suggested symbols immediately after inserting a period. Sometimes, there's an issue where this list doesn't appear and I have to delete and retype the previous word to get the list to show again. It seems to be a conflict with the autocompletion suggested by Copilot. I can confirm that disabling Copilot resolves this. Copilot enabledScreen.Recording.2024-04-23.at.22.53.16.movCopilot disabledScreen.Recording.2024-04-23.at.22.57.59.movI compared with the behaviour of Copilot in VSCode and it hides Copilot suggestions unless the autocomplete list is closed (like with Esc). |
Should be fixed in Zed 0.135 |
Another option is to use Control + Spacebar. Also, thank you @SomeoneToIgnore ! |
I am still experiencing this problem on 0.136.2 and I have to press ctrl+space every single time to get the autocomplete options. |
It still not working on the newest version... Not sure why was closed. |
Can you provide more details? So far, seems to work for me on a sample test project, and the test added also works — so there has to be something else, locally different for you, to trigger the behavior mismatch, or I am doing something wrong to reproduce it. Screen.Recording.2024-05-28.at.16.44.49.mov |
I tried it on different projects, I have come to realize that it doesn't work on big projects, while it works fine on smaller/medium-sized ones. I have only tried it with nodejs/typescript, as I don't have any equally big projects in any other languages. When I say a big project, I'm talking over 1000 .ts files, not counting node_modules (it's terrible legacy code) |
just started using zed yesterday and realized this is also happening to me (typescript codebase) after a restart it works again, until it doesn't codebase is very small, so it can't be that |
I am experiencing the same issue in my ts-server, and the version I am using is 0.139.3. It seems that something is wrong in ts-server, when I restart the project, it works. Is there anyway we can check the status for LSP? I will restart LSP when I get the issue, but I don't know the status. |
Is there a way to open the suggestion window by a keybind? |
you can try the command |
Given the changing of the language server and how this problem persists, I guess it's safe to say it might not be the language server problem. if what I'm saying sounds dumb, I apologize, I'm not familiar with how editors and language servers work. |
Check for existing issues
Describe the feature
As can be seen in the images below, the autocomplete only offers me suggestions after I insert a period, and this happens in any language I use daily (Go, Python & TypeScript).
This is quite annoying because it forces you to either read the documentation or start guessing the possible first letters of what you want.
My question is, is there a way to improve this? I come from using VSCode, and there it works 'as expected,' so why is it different in Zed?
In my opinion, this behavior in Zed is not productive.
After pressing period, nothing happens.
Since I know the name of the attribute, I press L and only at that moment does it suggest what I want.
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: