feature/file-templates: fix doom file templates
This commit is contained in:
parent
7ac29bbd27
commit
a862d0eeb1
1 changed files with 74 additions and 73 deletions
|
@ -48,9 +48,10 @@
|
||||||
`(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p)))
|
`(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p)))
|
||||||
#'ignore))))
|
#'ignore))))
|
||||||
|
|
||||||
|
(let ((doom (concat "/" (regexp-opt '(".emacs.d" ".doom.d" "doom-emacs" "doom")) "/.*")))
|
||||||
(mapc #'+file-templates-add
|
(mapc #'+file-templates-add
|
||||||
;; General
|
;; General
|
||||||
'(("/\\.gitignore$" "__" gitignore-mode)
|
`(("/\\.gitignore$" "__" gitignore-mode)
|
||||||
("/Dockerfile$" "__" dockerfile-mode)
|
("/Dockerfile$" "__" dockerfile-mode)
|
||||||
("/docker-compose.yml$" "__" yaml-mode)
|
("/docker-compose.yml$" "__" yaml-mode)
|
||||||
;; C/C++
|
;; C/C++
|
||||||
|
@ -65,9 +66,9 @@
|
||||||
("\\.el$" "__initfile" emacs-lisp-mode)
|
("\\.el$" "__initfile" emacs-lisp-mode)
|
||||||
("/.dir-locals.el$" nil)
|
("/.dir-locals.el$" nil)
|
||||||
("-test\\.el$" "__" emacs-ert-mode)
|
("-test\\.el$" "__" emacs-ert-mode)
|
||||||
("/\\(?:.emacs.d\\|doom-emacs\\)?/.+\\.el$" "__doom-module" emacs-lisp-mode)
|
(,(concat doom "/.+\\.el$") "__doom-module" emacs-lisp-mode)
|
||||||
("/\\(?:.emacs.d\\|doom-emacs\\)?/.+/packages\\.el$" "__doom-packages" emacs-lisp-mode)
|
(,(concat doom "/packages\\.el$") "__doom-packages" emacs-lisp-mode)
|
||||||
("/\\(?:.emacs.d\\|doom-emacs\\)?/.+/test/.+\\.el$" "__doom-test" emacs-lisp-mode)
|
(,(concat doom "/test/.+\\.el$") "__doom-test" emacs-lisp-mode)
|
||||||
(snippet-mode "__" snippet-mode)
|
(snippet-mode "__" snippet-mode)
|
||||||
;; Go
|
;; Go
|
||||||
("\\.go$" "__.go" go-mode)
|
("\\.go$" "__.go" go-mode)
|
||||||
|
@ -91,7 +92,7 @@
|
||||||
("\\.md$" "__" markdown-mode)
|
("\\.md$" "__" markdown-mode)
|
||||||
;; Org
|
;; Org
|
||||||
("\\.org$" "__" org-mode)
|
("\\.org$" "__" org-mode)
|
||||||
("/\\(?:.emacs.d\\|doom-emacs\\)?/.+/README\\.org$" "__doom-readme" org-mode)
|
(,(concat doom "/README\\.org$") "__doom-readme" org-mode)
|
||||||
;; PHP
|
;; PHP
|
||||||
("\\.php$" "__" php-mode)
|
("\\.php$" "__" php-mode)
|
||||||
("\\.class\\.php$" "__.class.php" php-mode)
|
("\\.class\\.php$" "__.class.php" php-mode)
|
||||||
|
@ -120,4 +121,4 @@
|
||||||
;; Shell scripts
|
;; Shell scripts
|
||||||
("\\.z?sh$" "__" sh-mode)
|
("\\.z?sh$" "__" sh-mode)
|
||||||
("\\.fish$" "__" fish-mode)
|
("\\.fish$" "__" fish-mode)
|
||||||
("\\.zunit$" "__zunit" sh-mode))))
|
("\\.zunit$" "__zunit" sh-mode)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue