nix-community / fenix

Rust toolchains and rust-analyzer nightly for Nix [maintainer=@figsoda]
Mozilla Public License 2.0
608 stars 39 forks source link

How to enable completions? #155

Open giggio opened 1 month ago

giggio commented 1 month ago

Completions are usually made available by rustup, which this package does not provide, IIRC. How can we get completions when using Fenix?

Temporary workaround, add a derivation that just copies the existing derivation to the expected directory: https://github.com/giggio/dotfiles/blob/448289156397e3d0aec40e2b7d22af13914ce2f0/config/home-manager/rust/cargo-completions.nix

giggio commented 4 weeks ago

After investigating it seems that completions are already in the package, at etc/bash_completion.d/cargo, it is just a matter of adding them to the derivation.