#tip: Change dimmed text/ui highlights, esp with Explorer or general file/directory names #1688
carlisia
started this conversation in
Show and tell
Replies: 3 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks for this! |
Beta Was this translation helpful? Give feedback.
0 replies
-
That works but it seems if I have it in my init.lua |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you are using a theme that makes the highlight of some elements too dim or almost invisible, this post is for you!
And also, I figured out how to customize the highlighting of anything so, just for fun, this might be for you too!
The theme I'm using to demo this is catppucin from my NvChad nvim startter. This is not as salient for most themes though.
Before
After
See the untracked
/assets
and/bat
folders? In the previous screenshot I cannot even tell they are there!I have Snacks Explorer configured to "show" hidden and ignored files and indeed they are listed, but by default those are set to have no highlighting. That's why everything under
.config
folders in the previous screenshot was dimmed, they are all considered hidden.This issue pointed me in the direction to find the entire configuration.
Sharing here in case it helps someone else running into the same need!
All UI elements without any highlight will be true by default for everything set to
"NonText"
here:https://github.com/folke/snacks.nvim/blob/bc0630e43be5699bb94dadc302c0d21615421d93/lua/snacks/picker/config/highlights.lua
The way to change this is to set your nvim highlight to a value you prefer instead. Note that this is a change that affects all pickers, not only Explorer.
Setting things to
Text
means they will pick up the highlight corresponding to, well, "text", from your theme.While I was at it, I changed the highlighting for git untracked as well. See the config below.
Special
is just a specific highlight setting that gave me a color that worked well for me for this theme and others I cycle thru.This is what I ended up with:
This is my config:
https://github.com/carlisia/dotfiles/blob/480650a15236d4a56dae5d638b4da1cca02cd7aa/nvim/.config/nvim/lua/options.lua#L11
Beta Was this translation helpful? Give feedback.
All reactions