Closed chaiNeehujui closed 1 year ago
@akanmuratcimen Gruvbox Material is a color scheme, it has no influence on filetype syntax. If you switch to a different color scheme you'll observe the same behavior.
I would suggest reporting this to Vim directly if this is actually a bug in the cpp
syntax.
Also, since you are using Neovim, enabling Treesitter syntax instead of Vim's default regexp-based syntax would give you much more accurate (and most likely bug-free) syntax highlights.
I'm already using Treesitter but you're right; the same behavior happens in another color scheme. I think this is a Treesitter bug. Thanks.
I have done the following steps before reporting this issue:
Operating system/version
debian bullseye
Terminal emulator/version
xfce4-terminal 1.0.4
$TERM environment variable
xterm-256color
Tmux version
No response
Feature matrix
Minimal vimrc that can reproduce this bug.
Steps to reproduce this bug using minimal vimrc
create a .c file. paste the following code:
comment and uncomment "extern "C" {" line (by using #) and see the changes on 'window_size' and 'speed' keywords.
Expected behavior
In a C file, commenting/uncommentting "extern "C" {" line should not affect the following syntax coloring. The expected behavior is as if the line "extern" C "{" does not exist.
Actual behavior
As you can see in the pictures below; in a C file, commenting/uncommentting the line "extern "C" {" changes the following colors.
https://imgur.com/a/kW41GL8
edit (@antoineco): add code fences