Update file detection for (wordpress|jekyll|web)-mode

This commit is contained in:
Henrik Lissner 2016-03-28 21:42:04 -04:00
parent a6dc9ebc4a
commit 8491c6b937

View file

@ -53,10 +53,9 @@
(use-package web-mode (use-package web-mode
:mode ("\\.\\(p\\)?htm\\(l\\)?$" :mode ("\\.\\(p\\)?htm\\(l\\)?$"
"\\.tpl\\(\\.php\\)?$" "\\.\\(tpl\\|blade\\)\\(\\.php\\)?$"
"\\.erb$" "\\.erb$"
"wp-content/themes/.+/.+\\.php$" "wp-content/themes/.+/.+\\.php$")
"\\.blade\\.php$")
:init :init
;; smartparens handles this ;; smartparens handles this
(setq web-mode-enable-auto-pairing nil (setq web-mode-enable-auto-pairing nil
@ -111,8 +110,8 @@
(add-yas-minor-mode! 'jekyll-mode)) (add-yas-minor-mode! 'jekyll-mode))
(associate! jekyll-mode (associate! jekyll-mode
:match "/\\(\\(css\\|_\\(layouts\\|posts\\|sass\\)\\)/.+\\|.+.html\\)$" :match "/\\(\\(css\\|_\\(layouts\\|posts\\|sass\\)\\)/.+\\|.+.html\\)$"
:files ("config.yml" "_layouts") :files ("config.yml" "_layouts/")
:in (web-mode scss-mode html-mode markdown-mode)) :in (web-mode scss-mode html-mode markdown-mode yaml-mode))
(add-hook! jekyll-mode (add-hook! jekyll-mode
(when (eq major-mode 'web-mode) (when (eq major-mode 'web-mode)
(web-mode-set-engine "django"))) (web-mode-set-engine "django")))
@ -126,7 +125,7 @@
(add-yas-minor-mode! 'wordpress-mode)) (add-yas-minor-mode! 'wordpress-mode))
(associate! wordpress-mode (associate! wordpress-mode
:match "/wp-\\(\\(content\\|admin\\|includes\\)/\\)?.+$" :match "/wp-\\(\\(content\\|admin\\|includes\\)/\\)?.+$"
:files ("wp-config.php" "wp-content")) :files ("wp-config.php" "wp-content/"))
(after! company-dict (add-to-list 'company-dict-minor-mode-list 'wordpress-mode)) (after! company-dict (add-to-list 'company-dict-minor-mode-list 'wordpress-mode))
(provide 'module-web) (provide 'module-web)