2016-10-17 03:36:54 +02:00
|
|
|
#+TITLE: CSS
|
|
|
|
|
|
|
|
scss-mode is based on css-mode, so any settings for css-mode also
|
|
|
|
automatically should work for scss-mode.
|
|
|
|
|
|
|
|
Enable electric pairing.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'css-mode-hook 'electric-pair-local-mode)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Enable electric indenting.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'css-mode-hook 'electric-indent-local-mode)
|
|
|
|
#+END_SRC
|
2016-10-19 22:53:07 +02:00
|
|
|
|
|
|
|
Enable company mode.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'css-mode-hook 'company-mode)
|
|
|
|
#+END_SRC
|
2016-10-20 16:18:39 +02:00
|
|
|
|
|
|
|
Enable rainbow mode to see all the color specifications (well, most)
|
|
|
|
as pretty colors.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'css-mode-hook 'rainbow-mode)
|
|
|
|
#+END_SRC
|
2016-12-02 14:40:23 +01:00
|
|
|
|
|
|
|
Add the scssc compiler's error message output to the compilation error
|
|
|
|
regexps.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(eval-when-compile (require 'compile))
|
|
|
|
|
|
|
|
(with-eval-after-load 'compile
|
|
|
|
(defvar oni:scss-error-regexp
|
|
|
|
(rx (and bol
|
|
|
|
(zero-or-more space) "on line "
|
|
|
|
(group (one-or-more digit)) " of "
|
|
|
|
(group (one-or-more (or word punct (syntax symbol))))
|
|
|
|
eol)))
|
|
|
|
|
|
|
|
(add-to-list 'compilation-error-regexp-alist
|
|
|
|
(list oni:scss-error-regexp 2 1 nil 2 2)))
|
|
|
|
#+END_SRC
|