nil
nil copied to clipboard
Option-completion in inlined modules?
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 97abe7d3d48721d4e0fcc1876eea83bb4247825b) 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
}];
}
```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.