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

rust-analyzer magic completions not working in helix #4831

Closed
itaseskii opened this issue Nov 20, 2022 · 3 comments
Closed

rust-analyzer magic completions not working in helix #4831

itaseskii opened this issue Nov 20, 2022 · 3 comments

Comments

@itaseskii
Copy link

itaseskii commented Nov 20, 2022

Hello,

I'm trying to start using helix as my default editor when programming with Rust but unfortunately some of the auto completion features are not working as expected.

Going by the following rust-analyzer manual https://rust-analyzer.github.io/manual.html#magic-completions the rust-analyzer should be able to autocomplete functions with (), generic types with <> and allow for postfix completions i.e expr.match → match expr {}.

Executing hx --health rust the setup seems fine.

Configured language server: rust-analyzer
Binary for language server: /home/itaseski/.local/bin/rust-analyzer
Configured debug adapter: lldb-vscode
Binary for debug adapter: Not found in $PATH
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓

Is this a missing feature, bug or issue with my own environment? If needed, I'm happy to provide a fix with some initial guidance.

Environment:
Linux Debian "bullseye" 11
Helix Editor 22.08.1
rust-analyzer latest

Regards, Ivica.

@the-mikedavis
Copy link
Member

These are done with LSP snippets which are not yet implemented (though there's some ongoing work) #395. I'll close in favor of that issue

@itaseskii
Copy link
Author

Hey @the-mikedavis are snippets also needed for basic autocompletion of functions and generics using () and <> respectively?

@the-mikedavis
Copy link
Member

Yep, those are snippets as well. Snippets allow you to specify where exactly the cursor should move to. Non-snippet completion items are basically a chunk of text to insert and then the cursor goes at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants