summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--attic/elisp/misc.el7
-rw-r--r--init.el14
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
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