Refactor core-editor def-package! blocks
This commit is contained in:
parent
5b78cf7ed6
commit
ac546220a4
1 changed files with 18 additions and 23 deletions
|
@ -167,27 +167,25 @@ fundamental-mode) for performance sake."
|
||||||
;; Autoloaded Plugins
|
;; Autoloaded Plugins
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(def-package! command-log-mode
|
(setq command-log-mode-auto-show t
|
||||||
:commands (command-log-mode global-command-log-mode)
|
command-log-mode-open-log-turns-on-mode t)
|
||||||
:config
|
|
||||||
(setq command-log-mode-auto-show t
|
|
||||||
command-log-mode-open-log-turns-on-mode t))
|
|
||||||
|
|
||||||
(def-package! dtrt-indent
|
(def-package! dtrt-indent
|
||||||
:after-call doom-before-switch-buffer-hook
|
:unless noninteractive
|
||||||
:config
|
:defer t
|
||||||
(setq dtrt-indent-verbosity (if doom-debug-mode 2 0))
|
:init
|
||||||
|
|
||||||
(defun doom|detect-indentation ()
|
(defun doom|detect-indentation ()
|
||||||
(unless (or doom-inhibit-indent-detection
|
(unless (or doom-inhibit-indent-detection
|
||||||
(eq major-mode 'fundamental-mode)
|
buffer-read-only
|
||||||
(not (derived-mode-p 'special-mode)))
|
(not (derived-mode-p 'prog-mode 'text-mode 'conf-mode)))
|
||||||
(dtrt-indent-mode +1)))
|
(dtrt-indent-mode +1)))
|
||||||
(unless noninteractive
|
(add-hook! (prog-mode text-mode conf-mode)
|
||||||
(add-hook 'after-change-major-mode-hook #'doom|detect-indentation)))
|
#'doom|detect-indentation)
|
||||||
|
:config
|
||||||
|
(setq dtrt-indent-verbosity (if doom-debug-mode 2 0)))
|
||||||
|
|
||||||
(def-package! expand-region
|
(def-package! expand-region
|
||||||
:commands (er/expand-region er/contract-region er/mark-symbol er/mark-word)
|
:commands (er/contract-region er/mark-symbol er/mark-word)
|
||||||
:config
|
:config
|
||||||
(defun doom*quit-expand-region ()
|
(defun doom*quit-expand-region ()
|
||||||
(when (memq last-command '(er/expand-region er/contract-region))
|
(when (memq last-command '(er/expand-region er/contract-region))
|
||||||
|
@ -196,19 +194,16 @@ fundamental-mode) for performance sake."
|
||||||
(advice-add #'doom/escape :before #'doom*quit-expand-region))
|
(advice-add #'doom/escape :before #'doom*quit-expand-region))
|
||||||
|
|
||||||
(def-package! helpful
|
(def-package! helpful
|
||||||
:commands (helpful-callable helpful-function helpful-macro helpful-command
|
:defer t
|
||||||
helpful-key helpful-variable helpful-at-point)
|
|
||||||
:init
|
:init
|
||||||
(setq counsel-describe-function-function #'helpful-callable
|
(setq counsel-describe-function-function #'helpful-callable
|
||||||
counsel-describe-variable-function #'helpful-variable)
|
counsel-describe-variable-function #'helpful-variable)
|
||||||
|
|
||||||
(global-set-key [remap describe-function] #'helpful-callable)
|
(define-key! 'global
|
||||||
(global-set-key [remap describe-command] #'helpful-command)
|
[remap describe-function] #'helpful-callable
|
||||||
(global-set-key [remap describe-variable] #'helpful-variable)
|
[remap describe-command] #'helpful-command
|
||||||
(global-set-key [remap describe-key] #'helpful-key))
|
[remap describe-variable] #'helpful-variable
|
||||||
|
[remap describe-key] #'helpful-key))
|
||||||
(def-package! pcre2el
|
|
||||||
:commands rxt-quote-pcre)
|
|
||||||
|
|
||||||
(provide 'core-editor)
|
(provide 'core-editor)
|
||||||
;;; core-editor.el ends here
|
;;; core-editor.el ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue