While highlight group in
.vimrc highlights patterns just fine, highlight groups in
.vim/after/ftplugin folder does not seem to do anything. Is it normal?
It is normal, you are not using the correct directory. See
If you are mostly satisfied with an existing syntax file, but would like to add a few items or change the highlighting, follow these steps: 1. Create your user directory from 'runtimepath', see above. 2. Create a directory in there called "after/syntax". For Unix: > mkdir ~/.config/nvim/after mkdir ~/.config/nvim/after/syntax 3. Write a Vim script that contains the commands you want to use. For example, to change the colors for the C syntax: > highlight cComment ctermfg=Green guifg=Green 4. Write that file in the "after/syntax" directory. Use the name of the syntax, with ".vim" added. For our C syntax: > :w ~/.config/nvim/after/syntax/c.vim That's it. The next time you edit a C file the Comment color will be different. You don't even have to restart Vim.
:h mysyntaxfile-replace if you want to completely replace an existing syntax file.