Calling this pivotal macro "def-package!" has frequently been a source of confusion. It is a thin wrapper around use-package, and it should be obvious that it is so. For this reason, and to match the naming convention used with other convenience macros/wrappers, it is now use-package!. Also changes def-package-hook! -> use-package-hook! The old macros are now marked obsolete and will be removed when straight integration is merged.
45 lines
1.1 KiB
EmacsLisp
45 lines
1.1 KiB
EmacsLisp
;;; lang/data/config.el -*- lexical-binding: t; -*-
|
|
|
|
;; Built in plugins
|
|
(add-to-list 'auto-mode-alist '("/sxhkdrc\\'" . conf-mode))
|
|
(add-to-list 'auto-mode-alist '("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode))
|
|
|
|
(use-package! nxml-mode
|
|
:mode "\\.p\\(?:list\\|om\\)\\'" ; plist, pom
|
|
:mode "\\.xs\\(?:d\\|lt\\)\\'" ; xslt, xsd
|
|
:mode "\\.rss\\'"
|
|
:magic "<\\?xml"
|
|
:config
|
|
(setq nxml-slash-auto-complete-flag t
|
|
nxml-auto-insert-xml-declaration-flag t)
|
|
(set-company-backend! 'nxml-mode '(company-nxml company-yasnippet)))
|
|
|
|
|
|
;;
|
|
;;; Third-party plugins
|
|
|
|
;; `csv-mode'
|
|
(map! :after csv-mode
|
|
:localleader
|
|
:map csv-mode-map
|
|
"a" #'csv-align-fields
|
|
"u" #'csv-unalign-fields
|
|
"s" #'csv-sort-fields
|
|
"S" #'csv-sort-numeric-fields
|
|
"k" #'csv-kill-fields
|
|
"t" #'csv-transpose)
|
|
|
|
(use-package! graphql-mode
|
|
:mode "\\.gql\\'")
|
|
|
|
(use-package! json-mode
|
|
:mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'"
|
|
:config
|
|
(set-electric! 'json-mode :chars '(?\n ?: ?{ ?})))
|
|
|
|
|
|
;;
|
|
;; Frameworks
|
|
|
|
(def-project-mode! +data-vagrant-mode
|
|
:files ("Vagrantfile"))
|