+ :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.
39 lines
1.2 KiB
EmacsLisp
39 lines
1.2 KiB
EmacsLisp
;;; feature/eval/config.el -*- lexical-binding: t; -*-
|
|
|
|
;; remove ellipsis when printing sexps in message buffer
|
|
(setq eval-expression-print-length nil
|
|
eval-expression-print-level nil)
|
|
|
|
|
|
;;
|
|
;; Plugin(s)
|
|
;;
|
|
|
|
(def-package! quickrun
|
|
:defer t
|
|
:init
|
|
(unless (boundp 'display-line-numbers)
|
|
(add-hook 'quickrun--mode-hook #'nlinum-mode))
|
|
:config
|
|
(setq quickrun-focus-p nil)
|
|
|
|
(set-popup-rule! "^\\*quickrun" '((size . 0.3)) '((transient . 0)))
|
|
|
|
(defun +eval*quickrun-auto-close (&rest _)
|
|
"Allows us to silently re-run quickrun from within the quickrun buffer."
|
|
(when-let* ((win (get-buffer-window quickrun--buffer-name)))
|
|
(let ((inhibit-message t))
|
|
(quickrun--kill-running-process)
|
|
(message ""))
|
|
(delete-window win)))
|
|
(advice-add #'quickrun :before #'+eval*quickrun-auto-close)
|
|
(advice-add #'quickrun-region :before #'+eval*quickrun-auto-close)
|
|
|
|
(defun +eval|quickrun-scroll-to-bof ()
|
|
"Ensures window is scrolled to BOF on invocation."
|
|
(with-selected-window (get-buffer-window quickrun--buffer-name)
|
|
(goto-char (point-min))
|
|
(let ((ignore-window-parameters t))
|
|
(shrink-window-if-larger-than-buffer))))
|
|
(add-hook 'quickrun-after-run-hook #'+eval|quickrun-scroll-to-bof))
|
|
|