Now that we are loading package autoloads files (as part of the generated doom-package-autoload-file when running make autoloads), many :commands properties are redundant. In fact, many def-package! blocks are redundant. In some cases, we can do without a config.el file entirely, and can move into the autoloads file or rely entirely on package autoloads. Also, many settings have been moved in their module's autoloads files, which makes them available ASAP; their use no longer depends on module load order. This gained me a modest ~10% boost in startup speed.
40 lines
871 B
EmacsLisp
40 lines
871 B
EmacsLisp
;;; lang/data/config.el -*- lexical-binding: t; -*-
|
|
|
|
;; Built in plugins
|
|
(dolist (spec '(("/sxhkdrc\\'" . conf-mode)
|
|
("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode)
|
|
("\\.plist\\'" . nxml-mode)))
|
|
(map-put auto-mode-alist (car spec) (cdr spec)))
|
|
|
|
(set! :company-backend 'nxml-mode '(company-nxml company-yasnippet))
|
|
|
|
|
|
;;
|
|
;; Third-party plugins
|
|
;;
|
|
|
|
(def-package! graphql-mode
|
|
:mode "\\.gql\\'")
|
|
|
|
(def-package! json-mode
|
|
:mode "\\.js\\(?:on\\|[hl]int\\(rc\\)?\\)\\'"
|
|
:config
|
|
(when (featurep! :feature syntax-checker)
|
|
(add-hook 'json-mode-hook #'flycheck-mode))
|
|
(set! :electric 'json-mode :chars '(?\n ?: ?{ ?})))
|
|
|
|
(def-package! vimrc-mode
|
|
:mode "\\.?vimperatorrc\\'")
|
|
|
|
|
|
;;
|
|
;; Frameworks
|
|
;;
|
|
|
|
(def-project-mode! +data-ansible-mode
|
|
:modes (yaml-mode)
|
|
:files "roles/")
|
|
|
|
(def-project-mode! +data-vagrant-mode
|
|
:files "Vagrantfile")
|
|
|