summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-10-30 02:10:14 +0000
committerjao <jao@gnu.org>2022-10-30 02:10:14 +0000
commitfbb1571cec862d16334e14c2613f356c1c938b3c (patch)
tree87f40a82e86e292145d8304a15cb7f6ad51442c3 /init.el
parent49807590c9e68eb0d0eda2dae5b60bf297922ba7 (diff)
downloadelibs-fbb1571cec862d16334e14c2613f356c1c938b3c.tar.gz
elibs-fbb1571cec862d16334e14c2613f356c1c938b3c.tar.bz2
symbol-overlay instead of smartscan
Diffstat (limited to 'init.el')
-rw-r--r--init.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/init.el b/init.el
index b42d6a3..6a05ed3 100644
--- a/init.el
+++ b/init.el
@@ -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