Browse Source

Add web-mode configs

master
10sr 5 years ago
parent
commit
a91563acc7
Signed by: 10sr GPG Key ID: 7BEC428194130EB2
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      emacs.el

+ 8
- 0
emacs.el View File

@@ -40,6 +40,7 @@ At compile time the feature will be loaded immediately."
(message "safe-require-or-eval: Trying to require %s" ,feature) (message "safe-require-or-eval: Trying to require %s" ,feature)
(require ,feature nil t))) (require ,feature nil t)))


;; TODO: Remove: Defining autoload is no more needed for most cases
(defmacro autoload-eval-lazily (feature &optional functions &rest body) (defmacro autoload-eval-lazily (feature &optional functions &rest body)
"Define autoloading FEATURE that defines FUNCTIONS. "Define autoloading FEATURE that defines FUNCTIONS.
FEATURE is a symbol. FUNCTIONS is a list of symbols. If FUNCTIONS is nil, FEATURE is a symbol. FUNCTIONS is a list of symbols. If FUNCTIONS is nil,
@@ -98,6 +99,7 @@ found, otherwise returns nil."
gosh-mode gosh-mode
scala-mode scala-mode
;;ensime ;;ensime
web-mode




color-moccur color-moccur
@@ -946,6 +948,11 @@ found, otherwise returns nil."
;; Include some extra modes ;; Include some extra modes
(require 'generic-x) (require 'generic-x)


(when (fboundp 'web-mode)
(add-to-list 'auto-mode-alist
'("\\.html\\.j2\\'" . web-mode))
)

(when (autoload-eval-lazily 'wgrep) (when (autoload-eval-lazily 'wgrep)
(set-variable 'wgrep-auto-save-buffer t) (set-variable 'wgrep-auto-save-buffer t)
(with-eval-after-load 'grep (with-eval-after-load 'grep
@@ -1271,6 +1278,7 @@ found, otherwise returns nil."
(add-to-list 'auto-mode-alist (add-to-list 'auto-mode-alist
'("build\\.gradle\\'" . groovy-mode))) '("build\\.gradle\\'" . groovy-mode)))



(add-to-list 'auto-mode-alist (add-to-list 'auto-mode-alist
'("\\.gawk\\'" . awk-mode)) '("\\.gawk\\'" . awk-mode))




Loading…
Cancel
Save