Question

Currently emacs isn't turning on paredit and isn't using any syntax highlighting when I edit .cljs files. It does when I edit .clj files and I want it to treat .cljs similar.

What do I have to do?

Was it helpful?

Solution

If you already have everything working for clojure you can just turn clojure-mode on for the current buffer using

M-x clojure-mode

If you want it turned on automatically you need to add an entry to the Auto Mode AList. In my case, adding the following to init.el did the trick:

(add-to-list 'auto-mode-alist '("\.cljs$" . clojure-mode))

After that you need to reload your init.el (M-x load-file) and re-open the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top