diff --git a/core/core-editor.el b/core/core-editor.el index cd8f26ea4..86f3ee067 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -162,6 +162,8 @@ enable multiple minor modes for the same regexp.") :init (add-hook! (emacs-lisp-mode js2-mode scss-mode) 'rainbow-delimiters-mode) :config (setq rainbow-delimiters-outermost-only-face-count 1)) +(use-package rainbow-mode :defer t) + (use-package rotate-text :commands (rotate-word-at-point rotate-region)) (use-package smart-forward :commands (smart-up smart-down smart-left smart-right)) diff --git a/modules/module-sass.el b/modules/module-sass.el deleted file mode 100644 index 9a4151531..000000000 --- a/modules/module-sass.el +++ /dev/null @@ -1,38 +0,0 @@ -;;; module-sass.el --- sass/scss - -(use-package sass-mode - :mode "\\.sass$" - :init (add-hook! sass-mode 'narf|enable-tab-width-2) - :config (after! company (add-company-backend! sass-mode (css)))) - -(use-package scss-mode - :mode "\\.scss$" - :init - (add-hook! scss-mode '(narf|enable-tab-width-2 hs-minor-mode flycheck-mode)) - (setq-default css-indent-offset 2) - (setq scss-compile-at-save nil) - :config - (bind! :map scss-mode-map - :n "M-r" 'narf/web-refresh-browser - :n ",;" 'helm-css-scss - :n ",:" 'helm-css-scss-multi) - - (after! web-beautify - (add-hook! scss-mode (setenv "jsbeautify_indent_size" "2")) - (bind! :map scss-mode-map :m "gQ" 'web-beautify-css)) - - (after! emr - (emr-declare-command 'narf/scss-toggle-inline-or-block - :title "toggle inline/block" - :modes 'scss-mode - :predicate (lambda () (not (use-region-p))))) - - (after! company (add-company-backend! scss-mode (css)))) - -(use-package rainbow-mode - :diminish rainbow-mode - :defer t - :init (add-hook! scss-mode 'rainbow-mode)) - -(provide 'module-sass) -;;; module-sass.el ends here diff --git a/modules/module-web.el b/modules/module-web.el index e8973bfff..7f8c0ab38 100644 --- a/modules/module-web.el +++ b/modules/module-web.el @@ -1,5 +1,36 @@ ;;; module-web.el +(add-hook! (sass-mode scss-mode) '(rainbow-mode narf|enable-tab-width-2 flycheck-mode)) + +(use-package sass-mode + :mode "\\.sass$" + :config + (after! company (add-company-backend! sass-mode (css)))) + +(use-package scss-mode + :mode "\\.scss$" + :init + (add-hook! scss-mode 'hs-minor-mode) + (setq-default css-indent-offset 2) + (setq scss-compile-at-save nil) + :config + (bind! :map scss-mode-map + :n "M-r" 'narf/web-refresh-browser + :n ",;" 'helm-css-scss + :n ",:" 'helm-css-scss-multi) + + (after! web-beautify + (add-hook! scss-mode (setenv "jsbeautify_indent_size" "2")) + (bind! :map scss-mode-map :m "gQ" 'web-beautify-css)) + + (after! emr + (emr-declare-command 'narf/scss-toggle-inline-or-block + :title "toggle inline/block" + :modes 'scss-mode + :predicate (lambda () (not (use-region-p))))) + + (after! company (add-company-backend! scss-mode (css)))) + (use-package web-beautify :commands (web-beautify-js web-beautify-css web-beautify-html) :init