summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-11-09 14:28:06 +0100
committerGravatar Tom Willemse2015-11-09 14:28:06 +0100
commit342bb782467f507c110abd6e4676293b7785ce20 (patch)
tree5b2666bf432c1eef40cd4261f38ec75a05c8712f /emacs
parentd1bafaca61a4493863701d47bd44cd0162ae8291 (diff)
downloaddotfiles-342bb782467f507c110abd6e4676293b7785ce20.tar.gz
dotfiles-342bb782467f507c110abd6e4676293b7785ce20.zip
Add beacon and extra highlighting for lisp
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org58
1 files changed, 58 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index c7d2e27..ea1c053 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1629,6 +1629,64 @@
<<flycheck-display>>)
#+END_SRC
+** Show a “beacon” when cursor position changes
+
+ #+BEGIN_SRC emacs-lisp :tangle no
+ (depends-on "beacon")
+ #+END_SRC
+
+ =beacon-mode= is a new minor mode that shows a temporary gradient
+ whenever the cursor screen position changes in a (somewhat)
+ unpredictable way. For example, when you switch buffers, when the
+ window scrolls because you’ve reached the top of the window, etc.
+
+ #+BEGIN_SRC emacs-lisp
+ (beacon-mode)
+ #+END_SRC
+
+*** Don’t show a beacon everywhere
+
+ Beacon by default already doesn’t show in certain buffers with
+ certain major modes, currently only =magit-status-mode= disables the
+ beacon. I have some more that I’d like to add.
+
+ #+BEGIN_SRC emacs-lisp
+ (stante-after beacon
+ (setq beacon-dont-blink-major-modes
+ (append beacon-dont-blink-major-modes
+ '(circe-channel-mode
+ circe-server-mode
+ magit-diff-mode
+ gnus-summary-mode
+ gnus-group-mode))))
+ #+END_SRC
+
+*** Show a beacon when recentering
+
+ Somehow I always get confused when I recenter my screen, is it in
+ the center, top or bottom? Beacon disables itself for the
+ recentering command, and I want it enabled, even though this is
+ completely predictable.
+
+ #+BEGIN_SRC emacs-lisp
+ (stante-after beacon
+ (setq beacon-dont-blink-commands
+ (delq 'recenter-top-bottom beacon-dont-blink-commands)))
+ #+END_SRC
+
+** Show some extra highlighted lisp symbols
+
+ There exists [[https://github.com/Fanael/highlight-defined][highlight-defined]], but this is a bit over-the-top for
+ me. I do like the way =js2-mode= highlights defined and undefined
+ variables. Hopefully this package comes a bit closer to how that
+ works.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'emacs-lisp-mode-hook 'lisp-extra-font-lock-mode)
+ (add-hook 'lisp-mode-hook 'lisp-extra-font-lock-mode)
+ (add-hook 'scheme-mode-hook 'lisp-extra-font-lock-mode)
+ #+End_src
+
* Final touches
These options and calls need to come last so they don't interfere