Alphabetize plugins in core-editor

Easier to find them this way.
This commit is contained in:
Henrik Lissner 2019-05-18 14:42:59 -04:00
parent 30319d1c3e
commit d62e13c803
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -72,15 +72,6 @@ detected.")
;; ;;
;;; Built-in plugins ;;; Built-in plugins
(def-package! server
:when (display-graphic-p)
:after-call (pre-command-hook after-find-file)
:config
(when-let* ((name (getenv "EMACS_SERVER_NAME")))
(setq server-name name))
(unless (server-running-p)
(server-start)))
(def-package! autorevert (def-package! autorevert
;; revert buffers for changed files ;; revert buffers for changed files
:after-call after-find-file :after-call after-find-file
@ -88,6 +79,26 @@ detected.")
(setq auto-revert-verbose nil) (setq auto-revert-verbose nil)
(global-auto-revert-mode +1)) (global-auto-revert-mode +1))
(def-package! recentf
;; Keep track of recently opened files
:defer-incrementally (easymenu tree-widget timer)
:after-call after-find-file
:commands recentf-open-files
:config
(setq recentf-save-file (concat doom-cache-dir "recentf")
recentf-auto-cleanup 'never
recentf-max-menu-items 0
recentf-max-saved-items 300
recentf-filename-handlers '(file-truename abbreviate-file-name)
recentf-exclude
(list "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\)$" "^/tmp/" "^/ssh:"
"\\.?ido\\.last$" "\\.revive$" "/TAGS$" "^/var/folders/.+$"
;; ignore private DOOM temp files
(recentf-apply-filename-handlers doom-local-dir)))
(unless noninteractive
(add-hook 'kill-emacs-hook #'recentf-cleanup)
(quiet! (recentf-mode +1))))
(def-package! savehist (def-package! savehist
;; persist variables across sessions ;; persist variables across sessions
:defer-incrementally (custom) :defer-incrementally (custom)
@ -122,25 +133,14 @@ savehist file."
:after-while #'doom*recenter-on-load-saveplace) :after-while #'doom*recenter-on-load-saveplace)
(save-place-mode +1)) (save-place-mode +1))
(def-package! recentf (def-package! server
;; Keep track of recently opened files :when (display-graphic-p)
:defer-incrementally (easymenu tree-widget timer) :after-call (pre-command-hook after-find-file)
:after-call after-find-file
:commands recentf-open-files
:config :config
(setq recentf-save-file (concat doom-cache-dir "recentf") (when-let* ((name (getenv "EMACS_SERVER_NAME")))
recentf-auto-cleanup 'never (setq server-name name))
recentf-max-menu-items 0 (unless (server-running-p)
recentf-max-saved-items 300 (server-start)))
recentf-filename-handlers '(file-truename abbreviate-file-name)
recentf-exclude
(list "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\)$" "^/tmp/" "^/ssh:"
"\\.?ido\\.last$" "\\.revive$" "/TAGS$" "^/var/folders/.+$"
;; ignore private DOOM temp files
(recentf-apply-filename-handlers doom-local-dir)))
(unless noninteractive
(add-hook 'kill-emacs-hook #'recentf-cleanup)
(quiet! (recentf-mode +1))))
;; ;;
@ -183,37 +183,13 @@ savehist file."
nil)) nil))
(def-package! smartparens (def-package! command-log-mode
;; Auto-close delimiters and blocks as you type. It's more powerful than that, :commands global-command-log-mode
;; but that is all Doom uses it for.
:after-call (doom-switch-buffer-hook after-find-file)
:commands (sp-pair sp-local-pair sp-with-modes sp-point-in-comment sp-point-in-string)
:config :config
(require 'smartparens-config) (setq command-log-mode-auto-show t
(setq sp-highlight-pair-overlay nil command-log-mode-open-log-turns-on-mode nil
sp-highlight-wrap-overlay nil command-log-mode-is-global t
sp-highlight-wrap-tag-overlay nil command-log-mode-window-size 50))
sp-show-pair-from-inside t
sp-cancel-autoskip-on-backward-movement nil
sp-show-pair-delay 0.1
sp-max-pair-length 4
sp-max-prefix-length 50
sp-escape-quotes-after-insert nil) ; not smart enough
;; autopairing in `eval-expression' and `evil-ex'
(defun doom|init-smartparens-in-eval-expression ()
"Enable `smartparens-mode' in the minibuffer, during `eval-expression' or
`evil-ex'."
(when (memq this-command '(eval-expression evil-ex))
(smartparens-mode)))
(add-hook 'minibuffer-setup-hook #'doom|init-smartparens-in-eval-expression)
(sp-local-pair 'minibuffer-inactive-mode "'" nil :actions nil)
;; smartparens breaks evil-mode's replace state
(add-hook 'evil-replace-state-entry-hook #'turn-off-smartparens-mode)
(add-hook 'evil-replace-state-exit-hook #'turn-on-smartparens-mode)
(smartparens-global-mode +1))
(def-package! dtrt-indent (def-package! dtrt-indent
@ -252,6 +228,64 @@ savehist file."
(advice-add #'dtrt-indent-mode :around #'doom*fix-broken-smie-modes)) (advice-add #'dtrt-indent-mode :around #'doom*fix-broken-smie-modes))
(def-package! helpful
;; a better *help* buffer
:commands helpful--read-symbol
:init
(define-key!
[remap describe-function] #'helpful-callable
[remap describe-command] #'helpful-command
[remap describe-variable] #'helpful-variable
[remap describe-key] #'helpful-key
[remap describe-symbol] #'doom/describe-symbol)
(after! apropos
;; patch apropos buttons to call helpful instead of help
(dolist (fun-bt '(apropos-function apropos-macro apropos-command))
(button-type-put
fun-bt 'action
(lambda (button)
(helpful-callable (button-get button 'apropos-symbol)))))
(dolist (var-bt '(apropos-variable apropos-user-option))
(button-type-put
var-bt 'action
(lambda (button)
(helpful-variable (button-get button 'apropos-symbol)))))))
(def-package! smartparens
;; Auto-close delimiters and blocks as you type. It's more powerful than that,
;; but that is all Doom uses it for.
:after-call (doom-switch-buffer-hook after-find-file)
:commands (sp-pair sp-local-pair sp-with-modes sp-point-in-comment sp-point-in-string)
:config
(require 'smartparens-config)
(setq sp-highlight-pair-overlay nil
sp-highlight-wrap-overlay nil
sp-highlight-wrap-tag-overlay nil
sp-show-pair-from-inside t
sp-cancel-autoskip-on-backward-movement nil
sp-show-pair-delay 0.1
sp-max-pair-length 4
sp-max-prefix-length 50
sp-escape-quotes-after-insert nil) ; not smart enough
;; autopairing in `eval-expression' and `evil-ex'
(defun doom|init-smartparens-in-eval-expression ()
"Enable `smartparens-mode' in the minibuffer, during `eval-expression' or
`evil-ex'."
(when (memq this-command '(eval-expression evil-ex))
(smartparens-mode)))
(add-hook 'minibuffer-setup-hook #'doom|init-smartparens-in-eval-expression)
(sp-local-pair 'minibuffer-inactive-mode "'" nil :actions nil)
;; smartparens breaks evil-mode's replace state
(add-hook 'evil-replace-state-entry-hook #'turn-off-smartparens-mode)
(add-hook 'evil-replace-state-exit-hook #'turn-on-smartparens-mode)
(smartparens-global-mode +1))
(def-package! undo-tree (def-package! undo-tree
;; Branching & persistent undo ;; Branching & persistent undo
:after-call (doom-switch-buffer-hook after-find-file) :after-call (doom-switch-buffer-hook after-find-file)
@ -280,41 +314,6 @@ savehist file."
(global-undo-tree-mode +1)) (global-undo-tree-mode +1))
(def-package! command-log-mode
:commands global-command-log-mode
:config
(setq command-log-mode-auto-show t
command-log-mode-open-log-turns-on-mode nil
command-log-mode-is-global t
command-log-mode-window-size 50))
;; `helpful' --- a better *help* buffer
(def-package! helpful
;; a better *help* buffer
:commands helpful--read-symbol
:init
(define-key!
[remap describe-function] #'helpful-callable
[remap describe-command] #'helpful-command
[remap describe-variable] #'helpful-variable
[remap describe-key] #'helpful-key
[remap describe-symbol] #'doom/describe-symbol)
(after! apropos
;; patch apropos buttons to call helpful instead of help
(dolist (fun-bt '(apropos-function apropos-macro apropos-command))
(button-type-put
fun-bt 'action
(lambda (button)
(helpful-callable (button-get button 'apropos-symbol)))))
(dolist (var-bt '(apropos-variable apropos-user-option))
(button-type-put
var-bt 'action
(lambda (button)
(helpful-variable (button-get button 'apropos-symbol)))))))
(def-package! ws-butler (def-package! ws-butler
;; a less intrusive `delete-trailing-whitespaces' on save ;; a less intrusive `delete-trailing-whitespaces' on save
:after-call (after-find-file) :after-call (after-find-file)