| 28 May 2021 |
emily | that's more IDE features than I expected anyone to be able to wring out of Nix :) | 06:10:45 |
aaronjanse | Try clicking on pkgs.gcc to see how the bootstrapping works | 06:10:48 |
aaronjanse | Oh there's much more to do! | 06:10:58 |
aaronjanse | That's just a start! | 06:11:01 |
aaronjanse | Next I have stuff like pulling comments from around function documentation and showing them when you hover | 06:11:23 |
aaronjanse | And auto-complete when you do lambda { ... } | 06:11:37 |
aaronjanse | * And auto-complete when you do some_lambda { ... } | 06:11:41 |
emily | thanks for working on this, it looks like it could solve some of the worst usability issues of nix! | 06:12:38 |
aaronjanse | Thank you! | 06:12:43 |
aaronjanse | I'm excited | 06:12:49 |
aaronjanse | I also think it can significantly help newbies understand how Nix works | 06:13:03 |
aaronjanse | Ooh and eventually I want to do auto-complete + docs for NixOS options by evaluating the NixOS system then backtracing to find where options are defined (instead of ugly hacks) | 06:13:55 |
aaronjanse | * Ooh and eventually I want to do auto-complete + docs for NixOS options by evaluating the NixOS system then backtracing to find where you're setting your options (instead of ugly hacks) | 06:14:07 |
aaronjanse | * Ooh and eventually I want to do auto-complete + docs for NixOS options by evaluating the NixOS system then backtracing to find where you're setting your options (instead of using ugly hacks to do autocomplete) | 06:14:18 |
emily | if you want to evaluate all of nixos on the fly you might need to reconsider the "does not aim to correctly implement Nix in its entirety" part :) | 06:17:34 |
emily | how are certain impure features handled, incidentally? I guess in flakes mode there's no concern about that | 06:18:00 |
emily | but it could be weird otherwise | 06:18:13 |
aaronjanse | Oh yeah right now it has no impure features | 06:18:16 |
aaronjanse | In reply to @emilazy:matrix.org if you want to evaluate all of nixos on the fly you might need to reconsider the "does not aim to correctly implement Nix in its entirety" part :) The trick is that we can evaluate enough to find where the options are without fully evaluating all the packages | 06:18:54 |
aaronjanse | Which is why it can do stuff like know the meta & location of the firefox derivation without knowing how to fully evaluate the stuff needed to compile it | 06:19:38 |
emily | nod | 06:20:03 |
emily | laziness is pretty useful for that | 06:20:14 |
aaronjanse | Exactly | 06:20:22 |
aaronjanse | In reply to @emilazy:matrix.org how are certain impure features handled, incidentally? I guess in flakes mode there's no concern about that Hehe, it definitely is hacky right now | 06:20:36 |
aaronjanse | Lemme find an example | 06:20:50 |
emily | it should be possible to handle without compromises using the pure-evaluation mode in unstable nix, but that's coupled to flakes sadly | 06:21:01 |
aaronjanse | Yeah | 06:21:21 |
aaronjanse | Oh! I did figure out how to find the inputs to a flake in the /nix/store | 06:21:45 |
aaronjanse | https://github.com/aaronjanse/nix-eval-lsp/blob/0c263b802d83b3988924d6db55a6a0ca60faf578/src/builtins.rs#L430-L432 | 06:22:05 |
aaronjanse | I didn't want to figure out hashing so it does /nix/store/00000... if you cast a path | 06:22:23 |