> Dear Efraim, thank you for wrestling with the monumentous complexity of
> the rust toolchain in order to package the rust tools for guix: I would
> not be able to learn this language with your efforts. However, I can't
> get completion for Rust's standard library std after installing the
> packages given by the specs "rust" and "rust:tools" which includes
> rust-analyzer.

Dear Kabelo,

For Rust's standard library completion, you might be missing `rust:rust-src` 
variant of the package `rust`?

> Given the logs I have I think it's because
> "rust-analyzer-proc-macro-srv" is missing.

I actually found out about the problem of `rust-analyzer-proc-macro-srv`. I 
started working on a patch, and have something that I believe works. You can 
try it on my channel for the moment [1]. Please tell if that works for you. 
Note that you won't be able to refer to it by it's name, so you might need to 
import the module and use the variable name `rust-1.82`. Here is a example of a 
manifest working with it.

```rust
(use-modules (guix packages)
             (guix profiles)
             (gnu packages commencement)
             (gnu packages llvm)
             (gnu packages rust)
             (tuziwo packages rust))

(packages->manifest (list clang
                          gcc-toolchain-14
                          pkg-config
                          rust-1.82
                          `(,rust-1.82 "cargo")
                          `(,rust-1.82 "rust-src")
                          `(,rust-1.82 "tools")
                          rust-analyzer))
```

That said, the solution I have is not entirely satisfactory. I talked with 
Efraim on last Friday (at the Guix Days) and we were trying to find a better 
solution [2] to push it upstream. So still digging (when I find time).

I hope this helps.

[1]: https://gitlab.com/woshilapin/tuziwo-channel/
[2]: 
https://internals.rust-lang.org/t/how-to-install-rust-analyzer-proc-macro-srv-cli/22306

> 
> Everyone else, any ideas about how to get lsp completion working for
> std?
> 
> --
> Best regards,
> Kabelo M'sobomvu Moiloa

Sincerely,
--
Jean SIMARD aka woshilapin

Reply via email to