Closed IC0hO closed 3 months ago
That's probably because these two tokens have the same color in Sonokai (yellow). I agree that we should optimize this in C/C++ files.
Could you please:
printf()
, then call the Neovim command :Inspect
and post the output?1. 2. The above are the outputs of 1 and 2 respectively
Also, is it better to use white for brackets, commas, and semicolons in C/C++ files? They were originally white, but after using treesitter they became gray.
This is now fixed on master
. Thanks for reporting!
Also, is it better to use white for brackets, commas, and semicolons in C/C++ files? They were originally white, but after using treesitter they became gray.
The Tree-sitter style (grey) is the intended one.
Unfortunately, we cannot achieve the same result in the Vim syntax because the built-in c syntax defines cParen
, cBracket
and cBlock
as regions, not as matches. Those regions are used to pinpoint imbalances between opening/blosing brackets, but cannot be used out of the box for highlighting punctuation.
For more context about why sainnhe made different design choices between the Vim and Tree-sitter syntaxes, please refer to https://github.com/sainnhe/everforest/issues/128.
Ok no problem, thank you for solving this issue.
nvim-treesitter I installed the two parsers, C and printf. After printf is installed, the parameters should be highlighted, but this color scheme does not.
Here is another color scheme: