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

How to enable completions? #155

Open
giggio opened this issue Jun 1, 2024 · 2 comments
Open

How to enable completions? #155

giggio opened this issue Jun 1, 2024 · 2 comments

Comments

@giggio
Copy link

giggio commented Jun 1, 2024

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
Copy link
Author

giggio commented Jun 4, 2024

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.

@AloisMisery
Copy link

I think something like

if [ -d $out/etc/bash_completion.d ]; then
  mkdir -p $out/share/bash-completion/completions
  cp $out/etc/bash_completion.d/* $out/share/bash-completion/completions
fi

needed to be added to installPhase in mk-toolchain.nix,

(sorry, im not familiar enough with git to make proper PR)

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