@@ -226,6 +226,30 @@ By default we favor the project-specific shadow-cljs over the system-wide."
226
226
:safe #'stringp
227
227
:package-version '(cider . " 0.10.0" ))
228
228
229
+ (defcustom cider-babashka-command
230
+ " bb"
231
+ " The command used to execute Babashka."
232
+ :type 'string
233
+ :group 'cider
234
+ :safe #'stringp
235
+ :package-version '(cider . " 1.2.0" ))
236
+
237
+ (defcustom cider-babashka-global-options
238
+ nil
239
+ " Command line options used to execute Babashka."
240
+ :type 'string
241
+ :group 'cider
242
+ :safe #'stringp
243
+ :package-version '(cider . " 1.2.0" ))
244
+
245
+ (defcustom cider-babashka-parameters
246
+ " nrepl-server"
247
+ " Params passed to babashka to start an nREPL server via `cider-jack-in' ."
248
+ :type 'string
249
+ :group 'cider
250
+ :safe #'stringp
251
+ :package-version '(cider . " 1.2.0" ))
252
+
229
253
(defcustom cider-jack-in-default (if (executable-find " clojure" ) 'clojure-cli 'lein )
230
254
" The default tool to use when doing `cider-jack-in' outside a project.
231
255
This value will only be consulted when no identifying file types, i.e.
@@ -238,7 +262,8 @@ to Leiningen."
238
262
(const boot)
239
263
(const clojure-cli)
240
264
(const shadow-cljs)
241
- (const gradle))
265
+ (const gradle)
266
+ (const babashka))
242
267
:group 'cider
243
268
:safe #'symbolp
244
269
:package-version '(cider . " 0.9.0" ))
@@ -257,6 +282,7 @@ command when there is no ambiguity."
257
282
(const clojure-cli)
258
283
(const shadow-cljs)
259
284
(const gradle)
285
+ (const babashka)
260
286
(const :tag " Always ask" nil ))
261
287
:group 'cider
262
288
:safe #'symbolp
@@ -333,6 +359,7 @@ Sub-match 1 must be the project path.")
333
359
('lein cider-lein-command)
334
360
('boot cider-boot-command)
335
361
('clojure-cli cider-clojure-cli-command)
362
+ ('babashka cider-babashka-command)
336
363
('shadow-cljs cider-shadow-cljs-command)
337
364
('gradle cider-gradle-command)
338
365
(_ (user-error " Unsupported project type `%S' " project-type))))
@@ -344,6 +371,7 @@ Throws an error if PROJECT-TYPE is unknown."
344
371
('lein (cider--resolve-command cider-lein-command))
345
372
('boot (cider--resolve-command cider-boot-command))
346
373
('clojure-cli (cider--resolve-command cider-clojure-cli-command))
374
+ ('babashka (cider--resolve-command cider-babashka-command))
347
375
; ; here we have to account for the possibility that the command is either
348
376
; ; "npx shadow-cljs" or just "shadow-cljs"
349
377
('shadow-cljs (let ((parts (split-string cider-shadow-cljs-command)))
@@ -358,6 +386,7 @@ Throws an error if PROJECT-TYPE is unknown."
358
386
('lein cider-lein-global-options)
359
387
('boot cider-boot-global-options)
360
388
('clojure-cli cider-clojure-cli-global-options)
389
+ ('babashka cider-babashka-global-options)
361
390
('shadow-cljs cider-shadow-cljs-global-options)
362
391
('gradle cider-gradle-global-options)
363
392
(_ (user-error " Unsupported project type `%S' " project-type))))
@@ -372,6 +401,7 @@ Throws an error if PROJECT-TYPE is unknown."
372
401
('lein cider-lein-parameters)
373
402
('boot cider-boot-parameters)
374
403
('clojure-cli nil )
404
+ ('babashka cider-babashka-parameters)
375
405
('shadow-cljs cider-shadow-cljs-parameters)
376
406
('gradle cider-gradle-parameters)
377
407
(_ (user-error " Unsupported project type `%S' " project-type))))
@@ -658,6 +688,10 @@ dependencies."
658
688
params
659
689
(cider-add-clojure-dependencies-maybe
660
690
cider-jack-in-dependencies)))
691
+ ('babashka (concat
692
+ global-opts
693
+ (unless (seq-empty-p global-opts) " " )
694
+ params))
661
695
('shadow-cljs (cider-shadow-cljs-jack-in-dependencies
662
696
global-opts
663
697
params
@@ -1522,6 +1556,7 @@ PROJECT-DIR defaults to current project."
1522
1556
(build-files '((lein . " project.clj" )
1523
1557
(boot . " build.boot" )
1524
1558
(clojure-cli . " deps.edn" )
1559
+ (babashka . " bb.edn" )
1525
1560
(shadow-cljs . " shadow-cljs.edn" )
1526
1561
(gradle . " build.gradle" )
1527
1562
(gradle . " build.gradle.kts" ))))
0 commit comments