antonj / scss-mode

Emacs mode for SCSS files (http://sass-lang.com)
200 stars 39 forks source link

mode hook? #29

Closed carljm closed 9 years ago

carljm commented 9 years ago

I'd like to automatically turn flymake mode on anytime I enter scss-mode, but I can't see how to do this. Parallel to other modes, I'd expect an scss-mode-hook or similar where I could set flymake-mode t, but I don't see that hook.

antonj commented 9 years ago

It's there, try something like this, it works

(defun aj-scss-mode-hook()
  (setq cssm-indent-function #'cssm-c-style-indenter)
  ;; (setq scss-sass-options '("--style" "compressed"))
  (rainbow-mode t))
(add-hook 'scss-mode-hook 'aj-scss-mode-hook)
carljm commented 9 years ago

Thanks! I guess I didn't see it as a Customize option and didn't see it by grepping scss-mode.el, so I assumed it wasn't there. Clearly it works in some magical way that I don't understand at all :-)