From e8e5ec5f40890a8a22bcf4d59f2f57239063c4f3 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 6 Jan 2020 15:19:57 +0000 Subject: Install prism for scope-highlighting > syntax highlighting I've wanted a library like this ever since I saw Douglas Crockford's JS talk about scope highlighting as a more useful alternative to syntax highlighting. --- configs/shared/.emacs.d/wpc/packages/wpc-lisp.el | 3 +++ configs/shared/.emacs.d/wpc/packages/wpc-misc.el | 4 ++++ configs/shared/.emacs.d/wpc/packages/wpc-python.el | 12 ++++++++++++ 3 files changed, 19 insertions(+) (limited to 'configs/shared') diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el b/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el index 4dff3e452902..0af82f27d20e 100644 --- a/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el +++ b/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el @@ -92,6 +92,9 @@ :config (general-add-hook 'emacs-lisp-mode #'ielm-mode)) +;; Prefer scope-highlighting instead of syntax highlighting for Elisp. +(add-hook 'emacs-lisp-mode #'prism-mode) + ;; TODO: Should I be using `general-define-key' or `evil-leader/set-key'? My ;; gut say `general-define-key'. (general-define-key diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-misc.el b/configs/shared/.emacs.d/wpc/packages/wpc-misc.el index 8af54c36ca80..5d3e75f7b016 100644 --- a/configs/shared/.emacs.d/wpc/packages/wpc-misc.el +++ b/configs/shared/.emacs.d/wpc/packages/wpc-misc.el @@ -76,6 +76,10 @@ ;; alternative to help (use-package helpful) +;; Similar to Douglas Crockford's idea of scope highlighting instead of syntax +;; highlighting. +(use-package prism) + ;; persist history etc b/w Emacs sessions (setq desktop-save 'if-exists) (desktop-save-mode 1) diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-python.el b/configs/shared/.emacs.d/wpc/packages/wpc-python.el index d0c6dd0d3e42..811327d63f11 100644 --- a/configs/shared/.emacs.d/wpc/packages/wpc-python.el +++ b/configs/shared/.emacs.d/wpc/packages/wpc-python.el @@ -9,9 +9,21 @@ ;;; Code: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Dependencies +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(require 'prism) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Configuration +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (use-package py-yapf :config (add-hook 'python-mode-hook #'py-yapf-enable-on-save)) +(add-hook 'python-mode-hook #'prism-mode) + (provide 'wpc-python) ;;; wpc-python.el ends here -- cgit 1.4.1