refactor!: remove highlight-numbers

BREAKING CHANGE: Numerics will no longer be syntax highlighted in major
modes that don't already have their own (or provided by tree-sitter). No
substitute will be provided because it's trivial for the user to install
themselves.

Ref: https://github.com/orgs/doomemacs/projects/5/views/1?pane=issue&itemId=117610783
This commit is contained in:
Henrik Lissner
2025-06-29 17:53:43 +02:00
parent 59c6b8e614
commit 5cb34fa151
6 changed files with 3 additions and 17 deletions

View File

@ -56,8 +56,8 @@ Buffers that are considered unreal (see `doom-real-buffer-p') are dimmed with
(prin1-to-string val))
((stringp val)
(propertize (format "%S" val) 'face 'font-lock-string-face))
((numberp val)
(propertize (format "%s" val) 'face 'highlight-numbers-number))
((and (numberp val) (facep 'font-lock-number-face)) ; introduced in 29.1+
(propertize (format "%s" val) 'face 'font-lock-number-face))
((format "%s" val)))
t)))

View File

@ -46,12 +46,7 @@
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]_build\\'")))
(when (modulep! +tree-sitter)
(add-hook 'elixir-mode-local-vars-hook #'tree-sitter! 'append))
(after! highlight-numbers
(puthash 'elixir-mode
"\\_<-?[[:digit:]]+\\(?:_[[:digit:]]\\{3\\}\\)*\\_>"
highlight-numbers-modelist)))
(add-hook 'elixir-mode-local-vars-hook #'tree-sitter! 'append)))
(use-package! flycheck-credo

View File

@ -166,8 +166,6 @@ See `+emacs-lisp-non-package-mode' for details.")
(append '(("\\(^\\*\\*\\*[^*]+\\*\\*\\*\\)\\(.*$\\)"
(1 font-lock-comment-face)
(2 font-lock-constant-face)))
(when (require 'highlight-numbers nil t)
(highlight-numbers--get-regexp-for-mode 'emacs-lisp-mode))
(cl-loop for (matcher . match-highlights)
in (append lisp-el-font-lock-keywords-2
lisp-cl-font-lock-keywords-2)