Prioritize hl-line Highlight Over Neotree Faces
In hindsight, it looks like my quest to tweak how Emacs looks and feels is to make it more Mac-like. No wonder, because I really like the OS X-era UI. So I’m still using the system default selection highlight colors and want these everywhere.
For example in neotree
.
The hl-line
current line highlight, combined with lin.el
(which I use for half a year) to make it act as a prominent selection instead of a subtle hint in that mode, did lose over neotree
’s own face settings.

Inspecting why that looked the way it looked via C-u C-x = to see the character and face information, I got this:
There are 2 overlays here:
From 565 to 598
face hl-line
priority -50
window nil
From 578 to 597
button [Show]
category default-button
face neo-file-link-face
follow-link t
help-echo [Show]
keymap [Show]
neo-full-path [Show]
Never saw this before, but “priority: -50” sounded like the way to go. Raise the priority, then maybe the hl-line
face would override the neo-file-link-face
of the file “button” at point.
But there’s no face property called ‘priority’. Searching the web for this, I found out about show-paren-priority
on Emacs.StackExchange, so it looks like this is commonly a variable, and yes, there is a hl-line-overlay-priority
and its value is -50
. I don’t know what other priorities there are, so I’m just flipping it to +50 for good measure.
(setq hl-line-overlay-priority +50)
Disable and re-enable hl-line-mode
and then it looks good!
The next nit I want to pick is to enable horizontal scrolling with the mouse for long filenames, and removing the block cursor when LIN is active (which you don’t see on the screenshots because I timed the picture with its blinking).
Receive new posts via email.