Ok folks, I've tried all these duplicates:
- How to know which highlighting group is used for the background of a word?
- How to identify the highlight groups in use on a particular character?
- How to check what of highlight is the word on cursor?
- Identify syntax region under cursor
But none of them work in for me in Neovim (0.8.2). And the plugin at https://github.com/benknoble/vim-synstax more helpfully reports "No syntax highlight groups under cursor".
I'm testing by putting my cursor in a word in a highlighted PHP doc and then firing the suggested command(s).
I just want my comments to be more readable (they're dark grey on black at the moment).
Is Neovim really different? Is it because I'm using Treesitter?
EDIT
Running without any plugins, the above answers work, it seems to be treesitter that causes the problem.
A minimal config is
use {
'nvim-treesitter/nvim-treesitter',
config = function()
require('nvim-treesitter.configs').setup({
highlight = { enable: true }
})
end,
}
Note that the problem only seems to occur when the treesitter's config specifies to enable highlight
.
vimrc
to the bare minimum). Let us know what you need to reproduce the problem. It will help us to reproduce and to help :-)vim
to reproduce would be helpful