Skip to content

Commit

Permalink
Add babashka to interpreter-mode-alist
Browse files Browse the repository at this point in the history
So files with a first line of e.g. `#!/bin/env bb`
will be in clojure-mode.
  • Loading branch information
dakra authored and bbatsov committed Nov 14, 2021
1 parent c1c4d9f commit 08d512a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Allow additional directories, beyond the default `clj[sc]`, to be correctly formulated by `clojure-expected-ns` via new `defcustom` entitled `clojure-directory-prefixes`
* Recognize babashka projects (identified by the presence of `bb.edn`).

### Changes

* [#604](https://github.com/clojure-emacs/clojure-mode/pull/604): Add `bb` (babashka) to `interpreter-mode-alist`.

## 5.13.0 (2021-05-05)

### New features
Expand Down
4 changes: 3 additions & 1 deletion clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -3005,7 +3005,9 @@ With universal argument \\[universal-argument], act on the \"top-level\" form."
(add-to-list 'auto-mode-alist '("\\.cljc\\'" . clojurec-mode))
(add-to-list 'auto-mode-alist '("\\.cljs\\'" . clojurescript-mode))
;; boot build scripts are Clojure source files
(add-to-list 'auto-mode-alist '("\\(?:build\\|profile\\)\\.boot\\'" . clojure-mode)))
(add-to-list 'auto-mode-alist '("\\(?:build\\|profile\\)\\.boot\\'" . clojure-mode))
;; babashka scripts are Clojure source files
(add-to-list 'interpreter-mode-alist '("bb" . clojure-mode)))

(provide 'clojure-mode)

Expand Down

0 comments on commit 08d512a

Please sign in to comment.