Refactor :lang auto-mode-alist entries

This commit is contained in:
Henrik Lissner 2018-05-07 18:18:07 +02:00
parent 23d887303d
commit 6b573bc66b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 14 additions and 13 deletions

View file

@ -17,7 +17,7 @@
(def-package! json-mode (def-package! json-mode
:mode "\\.js\\(on\\|[hl]int\\(rc\\)?\\)$" :mode "\\.js\\(?:on\\|[hl]int\\(rc\\)?\\)$"
:config :config
(when (featurep! :feature syntax-checker) (when (featurep! :feature syntax-checker)
(add-hook 'json-mode-hook #'flycheck-mode)) (add-hook 'json-mode-hook #'flycheck-mode))
@ -30,17 +30,18 @@
(set! :company-backend 'nxml-mode '(company-nxml company-yasnippet))) (set! :company-backend 'nxml-mode '(company-nxml company-yasnippet)))
(def-package! toml-mode :mode "\\.toml$") (def-package! toml-mode
:mode "\\.toml$")
(def-package! vimrc-mode (def-package! vimrc-mode
:mode "/\\.?g?vimrc$" :mode "/\\.?g?vimrc$"
:mode "\\.vim$" :mode "\\.vimp?$"
:mode "\\.?vimperatorrc$" :mode "\\.?vimperatorrc$")
:mode "\\.vimp$")
(def-package! yaml-mode :mode "\\.ya?ml$") (def-package! yaml-mode
:mode "\\.ya?ml$")
;; ;;

View file

@ -22,7 +22,7 @@
(def-package! groovy-mode (def-package! groovy-mode
:mode "\\.g\\(radle\\|roovy\\)$" :mode "\\.g\\(?:radle\\|roovy\\)$"
:config :config
(set! :eval 'groovy-mode "groovy")) (set! :eval 'groovy-mode "groovy"))

View file

@ -3,7 +3,7 @@
(def-package! markdown-mode (def-package! markdown-mode
:mode "/README$" :mode "/README$"
:mode ("/README\\.md$" . gfm-mode) :mode ("/README\\.md$" . gfm-mode)
:mode "\\.m\\(d\\|arkdown\\)$" :mode "\\.m\\(?:d\\|arkdown\\)$"
:init :init
(setq markdown-enable-wiki-links t (setq markdown-enable-wiki-links t
markdown-enable-math t markdown-enable-math t

View file

@ -1,7 +1,7 @@
;;; lang/plantuml/config.el -*- lexical-binding: t; -*- ;;; lang/plantuml/config.el -*- lexical-binding: t; -*-
(def-package! plantuml-mode (def-package! plantuml-mode
:mode "\\.p\\(lant\\)?uml$" :mode "\\.p\\(?:lant\\)?uml$"
:init :init
(setq plantuml-jar-path (concat doom-etc-dir "plantuml.jar") (setq plantuml-jar-path (concat doom-etc-dir "plantuml.jar")
org-plantuml-jar-path plantuml-jar-path) org-plantuml-jar-path plantuml-jar-path)

View file

@ -15,8 +15,8 @@
:mode "\\.rb$" :mode "\\.rb$"
:mode "\\.rake$" :mode "\\.rake$"
:mode "\\.gemspec$" :mode "\\.gemspec$"
:mode "\\.\\(pry\\|irb\\)rc$" :mode "\\.\\(?:pry\\|irb\\)rc$"
:mode "/\\(Gem\\|Cap\\|Vagrant\\|Rake\\|Pod\\|Puppet\\|Berks\\)file$" :mode "/\\(?:Gem\\|Cap\\|Vagrant\\|Rake\\|Pod\\|Puppet\\|Berks\\)file$"
:interpreter "ruby" :interpreter "ruby"
:config :config
(set! :company-backend 'ruby-mode '(company-dabbrev-code)) (set! :company-backend 'ruby-mode '(company-dabbrev-code))

View file

@ -1,7 +1,7 @@
;;; lang/scala/config.el -*- lexical-binding: t; -*- ;;; lang/scala/config.el -*- lexical-binding: t; -*-
(def-package! scala-mode (def-package! scala-mode
:mode "\\.s\\(cala\\|bt\\)$" :mode "\\.s\\(?:cala\\|bt\\)$"
:config (setq scala-indent:align-parameters t)) :config (setq scala-indent:align-parameters t))

View file

@ -2,7 +2,7 @@
(def-package! web-mode (def-package! web-mode
:mode "\\.p?html?$" :mode "\\.p?html?$"
:mode "\\.\\(tpl\\|blade\\)\\(\\.php\\)?$" :mode "\\.\\(?:tpl\\|blade\\)\\(\\.php\\)?$"
:mode "\\.erb$" :mode "\\.erb$"
:mode "\\.jsp$" :mode "\\.jsp$"
:mode "\\.as[cp]x$" :mode "\\.as[cp]x$"