diff options
author | jao <jao@gnu.org> | 2022-10-30 02:10:14 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-10-30 02:10:14 +0000 |
commit | fbb1571cec862d16334e14c2613f356c1c938b3c (patch) | |
tree | 87f40a82e86e292145d8304a15cb7f6ad51442c3 | |
parent | 49807590c9e68eb0d0eda2dae5b60bf297922ba7 (diff) | |
download | elibs-fbb1571cec862d16334e14c2613f356c1c938b3c.tar.gz elibs-fbb1571cec862d16334e14c2613f356c1c938b3c.tar.bz2 |
symbol-overlay instead of smartscan
-rw-r--r-- | attic/elisp/misc.el | 7 | ||||
-rw-r--r-- | init.el | 14 |
2 files changed, 16 insertions, 5 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index c2f168c..58cb9bb 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -45,6 +45,13 @@ (idris-stay-in-current-window-on-compiler-error t))) (jao-define-attached-buffer "^\\*idris.*") +;;; smart scan +(use-package smartscan + :ensure t + :commands smartscan-mode + :init (add-hook 'prog-mode-hook #'smartscan-mode) + :diminish) + ;;; vterm (use-package vterm :ensure t @@ -1916,12 +1916,16 @@ (add-to-list 'auto-mode-alist '("\\.am\\'" . makefile-mode)) (add-to-list 'auto-mode-alist '("\\.pl\\'\\|\\.pm\\'" . cperl-mode)) -;;;; smart scan -(use-package smartscan +;;;; symbol overlay +(use-package symbol-overlay :ensure t - :commands smartscan-mode - :init (add-hook 'prog-mode-hook #'smartscan-mode) - :diminish) + :config + (defun jao-symbol-reveal (&rest _) + (when outline-minor-mode (outline-show-entry))) + (advice-add 'symbol-overlay-basic-jump :after 'jao-symbol-reveal) + :bind (:map prog-mode-map (("M-i" . symbol-overlay-put) + ("M-n" . symbol-overlay-switch-forward) + ("M-p" . symbol-overlay-switch-backward)))) ;;;; eglot (use-package eglot |