0

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?

Sarien
  • 6,647
  • 6
  • 35
  • 55
  • possible duplicate of [How to tell emacs to open .h file in C++ mode?](http://stackoverflow.com/questions/3312114/how-to-tell-emacs-to-open-h-file-in-c-mode) – abo-abo Mar 28 '14 at 21:20

1 Answers1

2

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.

Sarien
  • 6,647
  • 6
  • 35
  • 55