Skip to content

Missing auto completion on std library #15845

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

Closed
chojs23 opened this issue Nov 7, 2023 · 8 comments · Fixed by #16101 or #16258
Closed

Missing auto completion on std library #15845

chojs23 opened this issue Nov 7, 2023 · 8 comments · Fixed by #16101 or #16258
Assignees
Labels
A-completion autocompletion Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug

Comments

@chojs23
Copy link

chojs23 commented Nov 7, 2023

rust-analyzer version : 2023-11-06

When I didn't import std::io::Write trait for TcpStream struct and I expect write() method for suggestion, but rust-analyzer only shows four methods.

If I add use::std::Write , It shows write() method for suggestions.

I use neovim and lsp-config and when I use vscode and rust-analyzer plugin, It does not work like neovim.

With intellij and jetbrain's rust plugin, It shows many other method for struct.

스크린샷 2023-11-07 오후 10 41 03

@chojs23 chojs23 added the C-bug Category: bug label Nov 7, 2023
@lnicola lnicola added the A-completion autocompletion label Nov 8, 2023
@lnicola
Copy link
Member

lnicola commented Nov 8, 2023

Confirmed, this one is pretty annoying. It's interesting that we do offer suggestions for write_fmt and write_all, from the same trait.

@lnicola lnicola added the Broken Window Bugs / technical debt to be addressed immediately label Nov 8, 2023
@chojs23
Copy link
Author

chojs23 commented Nov 9, 2023

@lnicola So this behavior is intended cause rust-analyzer didn't implement this ? I thought i have some wrong settings on neovim.

@lnicola
Copy link
Member

lnicola commented Nov 9, 2023

It's caused by RA, not NeoVim, but probably not intended.

I use neovim and lsp-config and when I use vscode and rust-analyzer plugin, It does not work like neovim.

Do you mean you get the write completion in VS Code?

@lnicola
Copy link
Member

lnicola commented Nov 9, 2023

It's caused by RA, not NeoVim, but probably not intended.

I use neovim and lsp-config and when I use vscode and rust-analyzer plugin, It does not work like neovim.

Do you mean you get the write completion in VS Code?

image

@chojs23
Copy link
Author

chojs23 commented Nov 9, 2023

@lnicola Both stable and nightly version of VScode rust analyzer extension gives me same suggestions as neovim (Not showing write())

@raman08
Copy link

raman08 commented Dec 9, 2023

it's same for me.

Any update on this?

@Veykril
Copy link
Member

Veykril commented Dec 9, 2023

No updates here yet, can try looking into this next week. Interestingly though, this works fine for Vec<u8>, so there is something special going on with TcpStream here

@Veykril
Copy link
Member

Veykril commented Dec 12, 2023

#16107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug
Projects
None yet
4 participants