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

pack_bindings action unavailable unless nested attrset already exists #130

Open
montchr opened this issue Apr 4, 2024 · 0 comments
Open

Comments

@montchr
Copy link

montchr commented Apr 4, 2024

When the cursor (marked by |) is on one of the inputs attributes [edit: or one of its direct children?], I would expect the pack_bindings code action to be available:

{
  inp|uts.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nix|os-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
  inputs.nix|pkgs.follows = "nixos-unstable";

  outputs = _: { };
}

But pack_bindings only becomes available when the cursor is on an existing nested attrset form:

{
  inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nixos-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
  inputs.nixpkgs.follows = "nixos-unstable";
  inp|uts = { };

  outputs = _: { };
}

That is fine in the minimal example. But when there are many attrs I would like to act upon, it becomes more difficult (for example, when dealing with the nested attributes of many inputs.<name> attributes).

This behavior is especially strange to me because I have a sense that this changed some time in the past few months. Though it is also very possible that I am mistaken.

If it matters, I am using the nil flake package within Emacs+Eglot.

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

1 participant