diff --git a/core/siren-core-modules.el b/core/siren-core-modules.el index 502a529..b0c6838 100644 --- a/core/siren-core-modules.el +++ b/core/siren-core-modules.el @@ -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 diff --git a/modules/editor/siren-auto-highlight-symbol.el b/modules/editor/siren-auto-highlight-symbol.el new file mode 100644 index 0000000..a42b336 --- /dev/null +++ b/modules/editor/siren-auto-highlight-symbol.el @@ -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 diff --git a/modules/themes/siren-doom-themes.el b/modules/themes/siren-doom-themes.el index 2319004..d824dc8 100644 --- a/modules/themes/siren-doom-themes.el +++ b/modules/themes/siren-doom-themes.el @@ -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)))))