mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
I've taken a lot of inspiration from Emacs-Prelude when it came to the structure of this rewritten config. I didn't want to use Prelude as I don't agree with all it's defaults, nor do I want to have to deal with any future changes in Prelude that might break things for me. So instead I went down the fully custom path, but heavily inspired by Prelude, both in terms of file/code structure, and also some of it's features. Compared to my old config setup, it's got most of the same things, but nearly everything is in a module file now, making it easy to fully enable/disable certain features.
37 lines
942 B
EmacsLisp
37 lines
942 B
EmacsLisp
;;
|
|
;; coffeescript
|
|
;;
|
|
|
|
(require 'siren-programming)
|
|
|
|
(eval-after-load 'coffee-mode
|
|
'(progn
|
|
(siren-require-packages '(coffee-mode))
|
|
|
|
(setq coffee-tab-width 2)
|
|
|
|
;; remove the "Generated by CoffeeScript" header
|
|
(add-to-list 'coffee-args-compile "--no-header")
|
|
|
|
(defun siren-coffee-mode-defaults ()
|
|
(siren-prog-mode-defaults)
|
|
|
|
;; Update the already compiled js on save
|
|
(and (buffer-file-name)
|
|
(file-exists-p (buffer-file-name))
|
|
(file-exists-p (coffee-compiled-file-name (buffer-file-name)))
|
|
(coffee-cos-mode t))
|
|
|
|
(setq tab-width 2)
|
|
(highlight-indentation-mode)
|
|
(highlight-indentation-current-column-mode)
|
|
(subword-mode +1))
|
|
|
|
(setq siren-coffee-mode-hook 'siren-coffee-mode-defaults)
|
|
|
|
(add-hook 'coffee-mode-hook (lambda ()
|
|
(run-hooks 'siren-coffee-mode-hook)))))
|
|
|
|
|
|
(provide 'siren-coffee)
|