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

nix_completer: Add action for completing attributes on flakes #2639

Closed
wants to merge 1 commit into from

Conversation

aftix
Copy link
Contributor

@aftix aftix commented Dec 14, 2024

Fixes: #2374

This will only complete attributes for flakes that are in the user's registry or are a local path. This means that the flake eval cache should be very useful for these completions, and that carapace won't go out and fetch random flakes when the user is trying to tab complete.

Fixes: carapace-sh#2374

This will only complete attributes for flakes that are in
the user's registry or are a local path. This means
that the flake eval cache should be very useful for these
completions, and that carapace won't go out and fetch
random flakes when the user is trying to tab complete.
@rsteube
Copy link
Member

rsteube commented Dec 22, 2024

Do we get different flake refs for nix develop or can we just use the completion of nix build as generic action?

@aftix
Copy link
Contributor Author

aftix commented Dec 22, 2024

I thought that they could be different since nix develop has .#foo default to .#devShells.<system-arch>.foo and build does it to .#packages.<system-arch>.foo but I tested and can't find a difference.

@rsteube
Copy link
Member

rsteube commented Dec 24, 2024

Merged with #2655 .

  • updated action to fit macro signatures
  • used the nix build completion (let's see how that works out)
  • moved the directory completion externally (bit tedious with all the Batch, but fits better how it is done elsewhere and the action is more focussed)
  • removed the cache (completion was fast in my tests without it)

@rsteube rsteube closed this Dec 24, 2024
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

Successfully merging this pull request may close these issues.

nix: flake output completion
2 participants