oxalica / nil

NIx Language server, an incremental analysis assistant for writing in Nix.
Apache License 2.0
1.32k stars 39 forks source link

Fix and improve types for flake outputs #66

Closed figsoda closed 1 year ago

figsoda commented 1 year ago

nil was giving me questionable completions - packages.default is not supposed to be a derivation, packages.${system}.default is. This PR fixes this issue for packages and devShells, and also fixes and improves types for nixosConfigurations. I wasn't able to get completion working correctly, but that seems to be a separate issue since I also couldn't get inputs.*.inputs.* to complete follows

oxalica commented 1 year ago

I wasn't able to get completion working correctly, but that seems to be a separate issue since I also couldn't get inputs.*.inputs.* to complete follows

Because the rest type { _: ty } is not implemented yet, only types of constant keys are. https://github.com/oxalica/nil/blob/68522526c92b3c1f1a1b4add876ea29040a4075e/crates/ide/src/ty/mod.rs#L31-L37

Nevertheless, this patch is good to have.