devenv icon indicating copy to clipboard operation
devenv copied to clipboard

`devenv init --detect`

Open nobe4 opened this issue 1 week ago • 3 comments

I am working on a bunch of project which don't use devenv/nix* and I find myself doing the following quite often:

  1. git clone ...
  2. devenv init
  3. update devenv.nix to have just languages.<X>.enable = true
  4. reload my shell

(sometimes, also languages.javascript.npm.install = true, or others)

I was wondering if it would be a nice improvement for the init command to automatically detect which kind of dependencies are expected and to have those blocks already configured.

I think a very simple detection via the presence of some files would suffice, with some basic options.

E.g.

  • package.json exists
  languages.javascript = {
    enable = true;
    npm = {
      enable = true;
      # install.enable = true;
    };
  };

  • go.mod exists
  language.go.enable = true;

I would be happy to take a crack at this, if guided to the best way to do it.

Thanks!

nobe4 avatar Jan 03 '26 11:01 nobe4