Fix `rainbow-mode' setup
This commit is contained in:
parent
e604ab21a3
commit
9722833400
24
README.org
24
README.org
@ -5940,23 +5940,19 @@ narrowed."
|
||||
:CUSTOM_ID: sec:rainbow-mode
|
||||
:END:
|
||||
|
||||
Listing [[lst:enable-rainbow-mode]] enables =rainbow-mode= to colorize color codes
|
||||
Listing [[lst:setup-rainbow-mode]] configures =rainbow-mode= to colorize color codes
|
||||
and names in buffers for debugging.
|
||||
|
||||
#+caption[Enable =rainbow-mode=]:
|
||||
#+caption: Enable =rainbow-mode=.
|
||||
#+name: lst:enable-rainbow-mode
|
||||
#+caption[Setup =rainbow-mode=]:
|
||||
#+caption: Setup =rainbow-mode=.
|
||||
#+name: lst:setup-rainbow-mode
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (and (ensure-package-installation 'rainbow-mode)
|
||||
(fboundp 'rainbow-mode))
|
||||
(setopt rainbow-x-colors-major-mode-list '(c++-mode
|
||||
c-mode
|
||||
emacs-lisp-mode
|
||||
inferior-emacs-lisp-mode
|
||||
lisp-interaction-mode
|
||||
org-mode
|
||||
python-mode))
|
||||
(rainbow-mode +1))
|
||||
(when (ensure-package-installation 'rainbow-mode)
|
||||
(setopt rainbow-x-colors-major-mode-list
|
||||
(list 'c++-mode 'c-mode 'emacs-lisp-mode 'inferior-emacs-lisp-mode
|
||||
'lisp-interaction-mode 'org-mode 'python-mode))
|
||||
(dolist (symbol '(emacs-lisp-mode-hook python-mode-hook))
|
||||
(add-hook symbol #'rainbow-mode)))
|
||||
#+end_src
|
||||
|
||||
** [[https://karthinks.com/software/batteries-included-with-emacs/][Flash the line around point for visual feedback]]
|
||||
|
Loading…
Reference in New Issue
Block a user