Introduce autodefs to replace some settings
+ :popup -> set-popup-rule! + :popups -> set-popup-rules! + :company-backend -> set-company-backend! + :evil-state -> set-evil-initial-state! I am slowly phasing out the setting system (def-setting! and set!), starting with these. What are autodefs? These are functions that are always defined, whether or not their respective modules are enabled. However, when their modules are disabled, they are replaced with macros that no-op and don't waste time evaluating their arguments. The old set! function will still work, for a while.
This commit is contained in:
parent
6693db48af
commit
d8b1e469bc
54 changed files with 329 additions and 248 deletions
|
@ -16,18 +16,19 @@
|
|||
;; Slice images into rows; easier to navigate around images
|
||||
ein:slice-image t)
|
||||
|
||||
(set! :popup "\\*ein: .*" :ignore)
|
||||
(set! :popup "\\*ein:tb .*"
|
||||
'((side . bottom) (size . 0.3))
|
||||
'((quit . t) (transient) (select)))
|
||||
(set! :popup "\\*ein:notebooklist *"
|
||||
'((side . left) (size . 50))
|
||||
'((select)))
|
||||
(set-popup-rules!
|
||||
'(("\\*ein: .*" :ignore t)
|
||||
("\\*ein:tb .*"
|
||||
((side . bottom) (size . 0.3))
|
||||
((quit . t) (transient) (select)))
|
||||
("\\*ein:notebooklist *"
|
||||
((side . left) (size . 50))
|
||||
((select)))))
|
||||
|
||||
(when (featurep! :completion company)
|
||||
;; Code completion with company
|
||||
(setq ein:completion-backend 'ein:use-company-backend)
|
||||
(set! :company-backend '(ein:notebook-multilang-mode
|
||||
(set-company-backend! '(ein:notebook-multilang-mode
|
||||
ein:notebook-python-mode
|
||||
ein:notebook-plain-mode)
|
||||
'ein:company-backend))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Emacs.
|
||||
|
||||
(after! gist
|
||||
(set! :evil-state 'gist-list-mode 'normal)
|
||||
(set-evil-initial-state! 'gist-list-mode 'normal)
|
||||
|
||||
(defun +gist*list-render (orig-fn &rest args)
|
||||
(funcall orig-fn (car args) t)
|
||||
|
|
|
@ -25,7 +25,7 @@ load everything.")
|
|||
magit-diff-refine-hunk t ;; Show word-granularity on the currently selected hunk
|
||||
magit-display-buffer-function #'+magit-display-buffer-fullscreen)
|
||||
|
||||
(set! :popup "^\\(?:\\*magit\\|magit:\\)" :ignore)
|
||||
(set-popup-rule! "^\\(?:\\*magit\\|magit:\\)" :ignore)
|
||||
;; Consider magit buffers real (so they can switched to)
|
||||
(add-hook 'magit-mode-hook #'doom|mark-buffer-as-real)
|
||||
;; no mode-line in magit popups
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
;; `pass'
|
||||
(after! pass
|
||||
(set! :env "PASSWORD_STORE_DIR")
|
||||
(set! :evil-state 'pass-mode 'emacs)
|
||||
(set! :popup "^\\*Password-Store"
|
||||
(set-evil-initial-state! 'pass-mode 'emacs)
|
||||
(set-popup-rule! "^\\*Password-Store"
|
||||
'((side . left) (size . 0.25))
|
||||
'((quit)))
|
||||
(define-key! pass-mode-map
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
(load! "+modeline")
|
||||
(add-hook! 'pdf-tools-enabled-hook (doom-set-modeline 'pdf-tools-modeline)))
|
||||
;; Handle PDF-tools related popups better
|
||||
(set! :popup "^\\*Outline*" '((side . right) (size . 40)) '((select)))
|
||||
(set-popup-rule! "^\\*Outline*" '((side . right) (size . 40)) '((select)))
|
||||
;; TODO: Add additional important windows that should be handled differently
|
||||
;; TODO: These two next rules don't work (they should), investigate
|
||||
;; (set! :popup "\\*Contents\\*" '((side . right) (size . 40)) nil)
|
||||
;; (set! :popup "* annots\\*$" '((side . left) (size . 40)) '((select)))
|
||||
;; (set-popup-rule! "\\*Contents\\*" '((side . right) (size . 40)) nil)
|
||||
;; (set-popup-rule! "* annots\\*$" '((side . left) (size . 40)) '((select)))
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; tools/prodigy/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! prodigy
|
||||
(set! :evil-state 'prodigy-mode 'emacs)
|
||||
(set-evil-initial-state! 'prodigy-mode 'emacs)
|
||||
|
||||
;; Make services, etc persistent between Emacs sessions
|
||||
(doom-cache-persist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue