Fix line numbers taking on styles from adjacent faces
Addresses #86, #114
This commit is contained in:
parent
d91f72b83e
commit
f1d134eb49
7 changed files with 51 additions and 20 deletions
|
@ -26,9 +26,6 @@
|
|||
(trailing-whitespace :background red)
|
||||
(vertical-border :background vertical-bar :foreground vertical-bar)
|
||||
(link :foreground highlight :underline t :bold 'inherit)
|
||||
;; Emacs 26.1 line numbers
|
||||
(line-number :inherit 'default :foreground base5 :distant-foreground base5 :bold nil)
|
||||
(line-number-current-line :inherit 'hl-line :foreground fg :distant-foreground fg :bold nil)
|
||||
|
||||
(error :foreground error)
|
||||
(warning :foreground warning)
|
||||
|
@ -59,6 +56,16 @@
|
|||
(mode-line-buffer-id :foreground fg :bold bold :distant-foreground bg)
|
||||
(header-line :inherit 'mode-line :distant-foreground bg)
|
||||
|
||||
;; 1. Line number faces must explicitly disable its text style attributes
|
||||
;; because nearby faces may "bleed" into the line numbers otherwise.
|
||||
;; 2. All other line number plugin faces should &inherit from these.
|
||||
(line-number
|
||||
:foreground base5 :distant-foreground base5
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
(line-number-current-line
|
||||
:foreground fg :distant-foreground fg
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
|
||||
|
||||
;; --- built-in plugin faces --------------
|
||||
;; dired
|
||||
|
|
|
@ -98,8 +98,14 @@ determine the exact padding."
|
|||
(doom-modeline-buffer-modified :inherit 'bold :foreground orange)
|
||||
(doom-modeline-buffer-path :inherit 'bold :foreground green)
|
||||
|
||||
(line-number :foreground base5 :distant-foreground nil :bold nil)
|
||||
(line-number-current-line :foreground base7 :distant-foreground nil :bold nil)
|
||||
;; Line number faces must explicitly disable its attributes, because nearby
|
||||
;; faces may "bleed" into the line numbers otherwise.
|
||||
(line-number
|
||||
:background nil :foreground base5 :distant-foreground nil
|
||||
:bold nil :underline nil :strike-through nil)
|
||||
(line-number-current-line
|
||||
:background nil :foreground base7 :distant-foreground nil
|
||||
:bold nil :underline nil :strike-through nil)
|
||||
|
||||
(isearch :foreground base0 :background green)
|
||||
|
||||
|
|
|
@ -115,8 +115,8 @@ determine the exact padding."
|
|||
(solaire-hl-line-face :inherit 'hl-line :background current-line)
|
||||
|
||||
;; linum
|
||||
(line-number :foreground grey :distant-foreground nil :bold nil)
|
||||
(line-number-current-line :background current-line :foreground highlight :distant-foreground nil :bold nil)
|
||||
(line-number :foreground grey :distant-foreground nil :bold nil :underline nil)
|
||||
(line-number-current-line :background current-line :foreground highlight :distant-foreground nil :bold nil :underline nil)
|
||||
|
||||
;; helm
|
||||
(helm-selection :foreground dark-grey :background selection)
|
||||
|
|
|
@ -113,8 +113,15 @@ determine the exact padding."
|
|||
:foreground doc-comments
|
||||
:slant 'italic)
|
||||
|
||||
(line-number :inherit 'default :foreground (doom-lighten base4 0.15) :distant-foreground nil :bold nil)
|
||||
(line-number-current-line :inherit 'hl-line :foreground base8 :distant-foreground nil :bold nil)
|
||||
;; Line number faces must explicitly disable its text style attributes
|
||||
;; because nearby faces may "bleed" into the line numbers otherwise.
|
||||
(line-number
|
||||
:inherit 'default :foreground (doom-lighten base4 0.15) :distant-foreground nil
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
(line-number-current-line
|
||||
:inherit 'hl-line :foreground base8 :distant-foreground nil
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
|
||||
(solaire-hl-line-face :inherit 'hl-line :background base0)
|
||||
|
||||
(doom-modeline-bar :background (if -modeline-bright modeline-bg highlight))
|
||||
|
|
|
@ -116,8 +116,14 @@ determine the exact padding."
|
|||
:inherit 'font-lock-comment-face
|
||||
:foreground doc-comments)
|
||||
|
||||
(line-number :inherit 'default :foreground base4 :distant-foreground nil :bold nil)
|
||||
(line-number-current-line :inherit 'hl-line :foreground base7 :distant-foreground nil :bold nil)
|
||||
;; Line number faces must explicitly disable its text style attributes
|
||||
;; because nearby faces may "bleed" into the line numbers otherwise.
|
||||
(line-number
|
||||
:foreground base4 :distant-foreground nil
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
(line-number-current-line
|
||||
:foreground base7 :distant-foreground nil
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
|
||||
(doom-modeline-bar :background (if -modeline-bright modeline-bg highlight))
|
||||
|
||||
|
|
|
@ -81,8 +81,14 @@ determine the exact padding."
|
|||
((doom-modeline-buffer-path :foreground violet :bold bold)
|
||||
(doom-modeline-buffer-major-mode :inherit 'doom-modeline-buffer-path)
|
||||
|
||||
(line-number :inherit 'default :foreground base4 :distant-foreground nil :bold nil)
|
||||
(line-number-current-line :inherit 'bold :foreground blue :background nil)
|
||||
;; Line number faces must explicitly disable its text style attributes
|
||||
;; because nearby faces may "bleed" into the line numbers otherwise.
|
||||
(line-number
|
||||
:foreground base4 :distant-foreground nil
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
(line-number-current-line
|
||||
:inherit 'bold :background nil :foreground blue
|
||||
:italic nil :underline nil :strike-through nil)
|
||||
|
||||
;; rainbow-delimiters
|
||||
(rainbow-delimiters-depth-1-face :foreground violet)
|
||||
|
|
|
@ -117,15 +117,14 @@ determine the exact padding."
|
|||
:inherit 'font-lock-comment-face
|
||||
:foreground doc-comments)
|
||||
|
||||
;; Line number faces must explicitly disable its text style attributes
|
||||
;; because nearby faces may "bleed" into the line numbers otherwise.
|
||||
(line-number
|
||||
:inherit 'default
|
||||
:foreground base4
|
||||
:distant-foreground nil
|
||||
:bold nil)
|
||||
:inherit 'default :foreground base4 :distant-foreground nil
|
||||
:bold nil :italic nil :underline nil :strike-through nil)
|
||||
(line-number-current-line
|
||||
:foreground blue
|
||||
:distant-foreground base8
|
||||
:bold bold)
|
||||
:inherit 'bold :foreground blue :distant-foreground base8
|
||||
:italic nil :underline nil :strike-through nil)
|
||||
|
||||
(doom-modeline-bar :background (if doom-vibrant-brighter-modeline modeline-bg highlight))
|
||||
(doom-modeline-buffer-path :foreground (if doom-vibrant-brighter-modeline base8 blue) :bold bold)
|
||||
|
|
Loading…
Reference in a new issue