• @blotz@lemmy.world
    link
    fedilink
    410 months ago

    I think both nix-env and flakes are designed with making package management easier. Nix-env tries to make it intuitive and familiar for new users. Flakes improve package management by simplifying the configuration.

    Personally I would love to see syntax highlighting, language server, code completion. Maybe all in a dedicated application which is configured to give the easiest experience for new users. If nix is intended to be managed through config files, then the experience of writing a config should be as easy as possible.

    • @itslilith@lemmy.blahaj.zone
      link
      fedilink
      510 months ago

      Syntax highlighting, LSP and code formatting work flawlessly for me using Helix, and therefore should on any editor that implemented LSP

    • @pr06lefs@lemmy.ml
      link
      fedilink
      3
      edit-2
      10 months ago

      The intent of nix-env was to make it easier, but the effect was to push some of your system state into a shadowy ‘env’ realm that is not managed by your *nix files. Same with channels - its state that isn’t in your configuration.nix.

      To me the whole point is to have all your state in some files you can check in to version control, and use to reproduce your system.

      Agree it would be cool to have a way to edit nix files that would give you all the args to functions, code completion etc. You do get some of that with the nix repl. Would be nice to even have a GUI for selecting packages for those that don’t “do” text editing.

      I’m using nixd for a nix language server, but haven’t seen a lot of benefit so far to be honest. I think part of the reason is nixpkgs isn’t pulled in until runtime, so most things are undefined as far as the lsp is concerned. Haven’t put a lot of time into it, there may be ways to make it more useful.