mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(editor): Use auto-highlight-symbol instead of highlight-symbol
It turns out that auto-highlight-symbol is a bit more advanced, with a MUCH nicer edit symbol feature than highlight-symbol does.
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
(require 'siren-global-keybindings)
|
||||
(require 'siren-packages)
|
||||
|
||||
;; Theme
|
||||
(require 'siren-doom-themes)
|
||||
|
||||
;; Completion
|
||||
(require 'siren-company)
|
||||
|
||||
@@ -22,12 +25,12 @@
|
||||
|
||||
;; Editor
|
||||
(require 'siren-amx)
|
||||
(require 'siren-auto-highlight-symbol)
|
||||
(require 'siren-browse-kill-ring)
|
||||
(require 'siren-display-fill-column)
|
||||
(require 'siren-display-indentation)
|
||||
(require 'siren-display-line-numbers)
|
||||
(require 'siren-folding)
|
||||
(require 'siren-highlight-symbol)
|
||||
(require 'siren-ido)
|
||||
(require 'siren-minions)
|
||||
(require 'siren-mwim)
|
||||
@@ -164,8 +167,5 @@
|
||||
(require 'siren-xml)
|
||||
(require 'siren-yaml)
|
||||
|
||||
;; Theme
|
||||
(require 'siren-doom-themes)
|
||||
|
||||
(provide 'siren-core-modules)
|
||||
;;; siren-core-modules.el ends here
|
||||
|
||||
31
modules/editor/siren-auto-highlight-symbol.el
Normal file
31
modules/editor/siren-auto-highlight-symbol.el
Normal file
@@ -0,0 +1,31 @@
|
||||
;;; siren-auto-highlight-symbol.el --- jimeh's Emacs Siren: auto-highlight-symbol configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for auto-highlight-symbol.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-doom-themes)
|
||||
|
||||
(use-package auto-highlight-symbol
|
||||
:diminish auto-highlight-symbol-mode
|
||||
|
||||
:bind
|
||||
(:map auto-highlight-symbol-mode-map
|
||||
("C-c C-p" . ahs-backward)
|
||||
("C-c C-n" . ahs-forward)
|
||||
("C-c C-r" . ahs-edit-mode))
|
||||
|
||||
:hook
|
||||
(prog-mode . auto-highlight-symbol-mode)
|
||||
|
||||
:custom
|
||||
(ahs-default-range 'ahs-range-whole-buffer)
|
||||
(ahs-idle-interval 1.0)
|
||||
(auto-highlight-symbol-mode-map (make-sparse-keymap))
|
||||
;; TODO: Fix exclusions, they don't seem to work.
|
||||
(ahs-exclude '((ruby-mode . "\_<\(end\|def\|class\|module\)\_>"))))
|
||||
|
||||
(provide 'siren-auto-highlight-symbol)
|
||||
;;; siren-auto-highlight-symbol.el ends here
|
||||
@@ -95,6 +95,30 @@
|
||||
(set-face-attribute 'hideshowvis-hidable-face nil
|
||||
:foreground (doom-color 'base7)))
|
||||
|
||||
(with-eval-after-load 'auto-highlight-symbol
|
||||
(set-face-attribute 'ahs-definition-face nil
|
||||
:foreground 'unspecified
|
||||
:background (doom-lighten 'bg 0.1)
|
||||
:underline t)
|
||||
(set-face-attribute 'ahs-edit-mode-face nil
|
||||
:foreground (doom-lighten 'fg 1.0)
|
||||
:background (doom-darken 'red 0.25))
|
||||
(set-face-attribute 'ahs-face nil
|
||||
:foreground 'unspecified
|
||||
:background (doom-lighten 'bg 0.1))
|
||||
(set-face-attribute 'ahs-plugin-bod-face nil
|
||||
:foreground 'unspecified
|
||||
:background (doom-color 'bg-alt))
|
||||
(set-face-attribute 'ahs-plugin-defalt-face nil
|
||||
:foreground 'unspecified
|
||||
:background (doom-color 'bg-alt))
|
||||
(set-face-attribute 'ahs-plugin-whole-buffer-face nil
|
||||
:foreground 'unspecified
|
||||
:background (doom-color 'bg-alt))
|
||||
(set-face-attribute 'ahs-warning-face nil
|
||||
:foreground (doom-color 'red)
|
||||
:background 'unspecified))
|
||||
|
||||
(with-eval-after-load 'fill-column-indicator
|
||||
(setq fci-rule-color (doom-lighten (doom-color 'base3) 0.10)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user