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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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