Files
.emacs.d/modules/languages/siren-coffee.el
Jim Myhrberg 8ed4a4e6f5 refactor: Visual indentation guides
- Switch from highlight-indentation package to highlight-indent-guides.
- Activate visual indentation in a prog-mode hook, rather than doing
  within each individual major mode. It was already done within all
  major modes based on prog-mode anyway.
- Add new siren-display-indetation module and function as a central way
  to enable visual indetation guides. This makes switching the
  underlying package at some point in the future much easier.
2020-01-26 18:53:44 +00:00

35 lines
774 B
EmacsLisp

;;; siren-coffee.el --- jimeh's Emacs Siren: coffee-mode configuration.
;;; Commentary:
;; Basic configuration for coffee-mode.
;;; Code:
(use-package coffee-mode
:mode "\\.coffee\\'"
:interpreter "coffee"
:hook
(coffee-mode . siren-coffee-mode-setup)
:custom
(coffee-tab-width 2)
:init
(defun siren-coffee-mode-setup ()
;; remove the "Generated by CoffeeScript" header
(add-to-list 'coffee-args-compile "--no-header")
;; 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)
(subword-mode +1)))
(provide 'siren-coffee)
;;; siren-coffee.el ends here