Closed AlphabetsAlphabets closed 3 years ago
Hi @YJH16120 :wave:
I even change the highlight group to
Search
and the highlight color worked.
This indicates that youraugroup
definition works fine. The vimCommentTitle
group is just an example and might not be available when your currently opened file is highlighted by a specific syntax highlighter. For example, if you're editing a HTML file (*.html
) a line like TODO:
the vimCommentTitle
group is not active and responsible for it. A valid HTML comment (<!-- TODO -->
) will be colored correctly but using the htmlComment
group instead.
This all means that you need to know the highlighting group for a syntax highlighter when you want to customize it instead of using Nords styles. To simplify the development of Nord I've added the following function to my Vim configuration that allows me to press Ctrl+k to print the highlight group(s) of the element under the caret.
" Shows syntax highlighting groups for the current cursor position
nmap <C-S-K> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
I see so then all I need to do is to just go through each comment group, find out what they are with that code snippet you gave me, then configure it accordingly then?
Correct, even through most plugins and syntax definitions link to default groups like Comment
, but for the ones that do not it requires this small additional snippets.
I see, thank you. I've messed around and it started to work.
I was following this guide on how to override the default nord color scheme, I wanted to try out the frost color palette, and I used the example provided in the guide above.
This is my
plugins.vim
file and a snippet of it that contains configs related to colorschemesI've tried many things such as moving
colorscheme nord
inside theaugroup
blocks, and using theautocmd VimEnter
on it as well. But nothing is changing. I'm relatively new to nvim so there is probably something I'm missing.After sourcing the file, nothing has changed. I even change the highlight group to
Search
and the highlight color worked, but I'm not sure why it didn't work forvimCommentTitle
And at this point I'm just trying random things like this:
To get at least some changes from the default but nothing.