Closed aloispichler closed 8 months ago
Could you please elaborate with an example?
Customizations can be achieved using an autocmd, like with any (Neo)vim colorscheme. There is an example in the docs, here is another one in Lua:
-- Apply custom highlights on colorscheme change.
-- Must be declared before executing ':colorscheme'.
vim.api.nvim_create_autocmd('ColorScheme', {
group = vim.api.nvim_create_augroup('gruvbox-material', {}),
pattern = 'gruvbox-material',
callback = function()
vim.api.nvim_set_hl(0, 'Delimiter', { link = 'Comment' })
end
})
Thank you, this works indeed! This is my favorite colorscheme for writing LaTeX since years, btw. Let me know if you consider adding a dimmed color for Delimiter. Something between the color of Comment and Whitespace would be nice, I believe.
If LaTeX highlights can be improved while remaining faithful to the semantics of the colorscheme we should definitely do that.
Adding new colors to gruvbox-material is a non-goal, but I'm sure that we can find a sensible defaults that use the existing palette. If not, users are free to customize things however they please. Every individual has different preferences, which is perfectly fine, especially in an editor like (Neo)vim which is designed with customization in mind.
You are right.
The default colors for Delimiter are:
which are fg0 from palette2.
This is what I think is good:
This is a very minor, but significant change, as delimiters are very frequent in LaTex: for example in: … let $x=3$ and …
.
This improves reading a lot.
I didn't have the occasion to open a tex
file in Vim and just got back to this issue.
Here is a breakdown of the highlight groups involved:
We don't currently have any customization for texDelimiter
in the colorscheme, and I agree that grey0
seems like a good candidate.
I enjoy dimmed colors for Delimiters (cf. onedark), so brackets etc. distract less. This can be achieved by
:hi Delimiter guifg=darkgray
Is there a way to load that directly, something like
{ 'sainnhe/gruvbox-material', opts={overrides={Delimiter= {link= "Comment"}}}},
?