|
43 | 43 | :parse-fn #(Integer/parseInt %)} |
44 | 44 | "-b,--nrepl-bind ADDR" {:doc "Bind address of nrepl, by default \"127.0.0.1\"." |
45 | 45 | :default "127.0.0.1"} |
46 | | - "--[no-]emacs" {:doc "Shorthand for --cider-nrepl --refactor-nrepl --cider-connect" |
47 | | - :handler (fn [ctx v] |
48 | | - (assoc ctx |
49 | | - :cider-nrepl v |
50 | | - :refactor-nrepl v |
51 | | - :cider-connect v))} |
52 | | - "--[no-]vs-code" {:doc "Alias for --cider-nrepl" |
53 | | - :handler (fn [ctx] (assoc ctx :cider-nrepl true))} |
54 | | - "--[no-]cider-nrepl" {:doc "Include CIDER nREPL dependency and middleware" |
55 | | - :value true} |
56 | | - "--[no-]refactor-nrepl" {:doc "Include refactor-nrepl dependency and middleware" |
57 | | - :value true} |
58 | | - "--[no-]cider-connect" {:doc "Automatically connect Emacs CIDER" |
59 | | - :value true} |
60 | | - "--[no-]portal" {:doc "Include djblue/portal as a dependency, and define (user/portal)" |
61 | | - :value true} |
62 | | - "--[no-]sayid" {:doc "Include Sayid dependency and middleware" |
63 | | - :value true} |
64 | | - "--[no-]debug-repl" {:doc "Include gfredericks/debug-repl dependency and middleware" |
65 | | - :value true} |
| 46 | + "--[no-]emacs" {:doc "Shorthand for --cider-nrepl --refactor-nrepl --cider-connect"} |
| 47 | + "--[no-]vs-code" {:doc "Alias for --cider-nrepl"} |
| 48 | + "--[no-]cider-nrepl" {:doc "Include CIDER nREPL dependency and middleware"} |
| 49 | + "--[no-]refactor-nrepl" {:doc "Include refactor-nrepl dependency and middleware"} |
| 50 | + "--[no-]cider-connect" {:doc "Automatically connect Emacs CIDER"} |
| 51 | + "--[no-]portal" {:doc "Include djblue/portal as a dependency, and define (user/portal)"} |
| 52 | + "--[no-]sayid" {:doc "Include Sayid dependency and middleware"} |
| 53 | + "--[no-]debug-repl" {:doc "Include gfredericks/debug-repl dependency and middleware"} |
66 | 54 | "--[no-]go" {:doc "Call (user/go) on boot"} |
67 | | - "--[no-]namespace-maps" {:doc "Disable *print-namespace-maps* through nREPL middleware" |
68 | | - :value true}]) |
| 55 | + "--[no-]namespace-maps" {:doc "Disable *print-namespace-maps* through nREPL middleware"}]) |
69 | 56 |
|
70 | 57 | (def library-versions |
71 | 58 | (:deps (edn/read-string (slurp (io/resource "launchpad/deps.edn"))))) |
|
288 | 275 |
|
289 | 276 | (defn handle-cli-args [{:keys [executable project-root deps-edn main-opts] :as ctx}] |
290 | 277 | (cond |
291 | | - (:emacs ctx) |
292 | | - (assoc (dissoc ctx :emacs) |
293 | | - :cider-nrepl true |
294 | | - :refactor-nrepl true |
295 | | - :cider-connect true) |
296 | | - (:vs-code ctx) |
297 | | - (assoc (dissoc ctx :vs-code) |
298 | | - :cider-nrepl true) |
| 278 | + (some? (:emacs ctx)) |
| 279 | + (merge {:cider-nrepl (:emacs ctx) |
| 280 | + :refactor-nrepl (:emacs ctx) |
| 281 | + :cider-connect (:emacs ctx)} |
| 282 | + (dissoc ctx :emacs)) |
| 283 | + (some? (:vs-code ctx)) |
| 284 | + (merge {:cider-nrepl (:emacs ctx)} |
| 285 | + (dissoc ctx :vs-code)) |
299 | 286 | :else |
300 | 287 | ctx)) |
301 | 288 |
|
|
0 commit comments