From ce9f03f31063be9d0faf9e9de2b94186e3f2496c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 16 Aug 2018 15:17:07 +0200 Subject: [PATCH] Use personal fork of highlight-escape-sequences Improves elisp support, adds support for more modes and fixes some minor issues. --- core/core-ui.el | 16 +--------------- core/packages.el | 3 ++- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 34c22b0a6..28c7cfc9a 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -144,21 +144,7 @@ Also see `doom-exit-buffer-hook'.") ;; `highlight-escape-sequences' (def-package! highlight-escape-sequences - :after-call after-find-file - :config - (defconst hes-python-escape-sequence-re - (rx (submatch - (and ?\\ (submatch - (or (repeat 1 3 (in "0-7")) - (and ?x (repeat 2 xdigit)) - (and ?u (repeat 4 xdigit)) - (and ?U (repeat 8 xdigit)) - (and ?N "{" (one-or-more alpha) "}") - (any "\"\'\\abfnrtv"))))))) - (add-to-list 'hes-mode-alist `(python-mode . ,hes-python-escape-sequence-re)) - - (add-to-list 'hes-mode-alist `(enh-ruby-mode . ,hes-ruby-escape-sequence-keywords)) - (hes-mode +1)) + :hook ((prog-mode conf-mode) . highlight-escape-sequences-mode)) ;; `rainbow-delimiters' Helps us distinguish stacked delimiter pairs. Especially ;; in parentheses-drunk languages like Lisp. diff --git a/core/packages.el b/core/packages.el index b67d49e22..bbe27d438 100644 --- a/core/packages.el +++ b/core/packages.el @@ -11,7 +11,8 @@ (package! hide-mode-line) (package! highlight-indentation) (package! highlight-numbers) -(package! highlight-escape-sequences) +(package! highlight-escape-sequences + :recipe (:fetcher github :repo "hlissner/highlight-escape-sequences")) (unless (boundp 'display-line-numbers) (package! nlinum) (package! nlinum-hl)