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

No autocomplete for Tool Prelude attributes in VsCode. #19276

Open
TmSalviano opened this issue Mar 3, 2025 · 3 comments
Open

No autocomplete for Tool Prelude attributes in VsCode. #19276

TmSalviano opened this issue Mar 3, 2025 · 3 comments
Labels
A-completion autocompletion C-feature Category: feature request

Comments

@TmSalviano
Copy link

TmSalviano commented Mar 3, 2025

Thank you all for putting in the work and effort to make Rust the best language ever!

I am having a problem with the rust_analyzer tool in VsCode. There is no autocomplete for the Tool Prelude attributes. I was incapable of finding answers on google.

The Tool Prelude is imported. I already tested #[rustfmt::skip] for example and it's working just fine

The only problem is the autocomplete. Here is my rust analyzer configurations in VsCode:

  "rust-analyzer.inlayHints.lifetimeElisionHints.enable": "always",
  "rust-analyzer.inlayHints.reborrowHints.enable": "always",
  "rust-analyzer.cargo.features": "all",

I am pretty confident this is not a VsCode problem because the intellisense seems to be working perfectly well for everything else. I suspect it is a rust_analyzer configuration issue, since rust_analyzer is also working perfectly fine for everything else as well.

I don't really know if this is a VsCode problem or a rust_analyzer problem. I don't even know if it is a problem thanks to the only clue i got from The Rust Prelude:

"When a tool is not in use, the tool’s attributes are accepted without a warning. When the tool is in use, the tool is responsible for processing and interpretation of its attributes."

Is this even a problem? I am completely lost and any help would be deeply appreciated.

@TmSalviano TmSalviano added the C-support Category: support questions label Mar 3, 2025
@ChayimFriedman2
Copy link
Contributor

If you mean completion for attributes such as #[rustfmt::skip], there is no autocomplete because nobody ever implemented it. The code responsible for completing attributes is here: https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/completions/attribute.rs, if someone wants to work on this.

@ChayimFriedman2 ChayimFriedman2 added A-completion autocompletion C-feature Category: feature request and removed C-support Category: support questions labels Mar 3, 2025
@TmSalviano
Copy link
Author

Thank you very much!

@ChayimFriedman2
Copy link
Contributor

I reopened this to track this feature here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants