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

Option-completion in inlined modules? #103

Open
Ma27 opened this issue Aug 29, 2023 · 1 comment
Open

Option-completion in inlined modules? #103

Ma27 opened this issue Aug 29, 2023 · 1 comment
Labels
A-ty Area: type system C-feature Catagory: feature

Comments

@Ma27
Copy link
Contributor

Ma27 commented Aug 29, 2023

While a lot of modules are in their own files, it's also possible to inline them in e.g. a flake.nix:

{
  description = "foobar";
  outputs = { self, nixpkgs, ... }: {
    nixosModules.default = { lib, ... }: {
      services.|
    };
  };
}

Right now (as of 97abe7d) there's no completion for option-names at the |-symbol in the example above. A similar case can be observed when using imports or mkMerge:

{ lib, ... }: {
  imports = [
    ({ config, ... }: {
      # no completion in here
    })
  ];
}
{ lib, ... }: {
  services = lib.mkMerge [{
    # no completion in here
  }];
}
@oxalica oxalica added A-ty Area: type system C-feature Catagory: feature labels Sep 2, 2023
@oxalica
Copy link
Owner

oxalica commented Sep 2, 2023

```nix
{
  description = "foobar";
  outputs = { self, nixpkgs, ... }: {
    nixosModules.default = { lib, ... }: {
      services.|
    };
  };
}
{ lib, ... }: {
  imports = [
    ({ config, ... }: {
      # no completion in here
    })
  ];
}

These are doable, I think. But some extra work should be done to correctly handle recursive types.

{ lib, ... }: {
  services = lib.mkMerge [{
    # no completion in here
  }];
}

This is a dup of #104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty Area: type system C-feature Catagory: feature
Projects
None yet
Development

No branches or pull requests

2 participants