neil icon indicating copy to clipboard operation
neil copied to clipboard

suggestion: support `neil add nrepl -with-cider`

Open behrica opened this issue 2 years ago • 3 comments

this could add

--middleware" "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]

and

cider/cider-nrepl {:mvn/version "latest"} + refactor-nrepl/refactor-nrepl {:mvn/version latest}

to the alias ":nrepl"

behrica avatar Dec 08 '23 21:12 behrica

I'm fine with adding this by default, people can remove it if they don't like it.

borkdude avatar Dec 08 '23 21:12 borkdude

@behrica I might take a stab at this—the alias logic has recently changed, making it a bit easier to work with.

Can you help me check whether the following alias entry is what you'd expect?

{:extra-deps
 {nrepl/nrepl {:mvn/version "1.1.2"},
  cider/cider-nrepl {:mvn/version "0.49.0"},
  refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}},
 :main-opts
 ["-m" "nrepl.cmdline" "--interactive" "--color"
  "--middleware" "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}

teodorlu avatar Jun 07 '24 09:06 teodorlu

I've got code at #223 that produces the following:

$ neil-dev add nrepl
$ cat deps.edn 
{:deps {}
 :aliases {:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "1.1.2"}, cider/cider-nrepl {:mvn/version "0.49.0"}, refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
                   :main-opts ["-m" "nrepl.cmdline" "--interactive" "--color" "--middleware" "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}}}

I'm not super happy with the super long lines, especially that each key in :extra-deps is on its own line.

teodorlu avatar Jun 07 '24 09:06 teodorlu