How do I get the highlighting group of a text when the group is defined by the command
For example when a word is misspelled I want to get the highlighting group
We have a question on this site about how to get the highlighting group of a text in a buffer, the answer recommends to use the following command:
:echo synIDattr(synID(line("."), col("."), 1), "name")
and I also have another command using
However both of these commands work pretty well for all of the highlighting groups others than the ones defined by
The only reference of this bug that I can find is this SO comment. Am I missing something or does anyone have a workaround?