Closed MuhammadSawalhy closed 2 years ago
Looks like it's a bug of tree-sitter. Can you reproduce it using default
color scheme?
Looks like it's a bug of tree-sitter. Can you reproduce it using
default
color scheme?
The second case (edge + treesitter only), no problem.
The issue occurs in the last case only, I think it is polyglot plugin that make this issue appear, but everything is fine when using other color schemes such as gruvbox, so it seems that the issue is in edge 🤷♂️.
What a color scheme does can be briefly summarized as creating highlight groups, it doesn't actually highlight the text. Instead, highlighting engines like builtin vim syntax engine (improved by vim-polyglot), nvim-treesitter and semantic highlighting provided by coc.nvim, will read these highlight groups and highlight the text based on these colors.
So if the colors work as expected in normal mode but break in visual mode, it's most likely caused by highlighting engines. I encountered similar issues before and it's caused by tree-sitter https://github.com/nvim-treesitter/nvim-treesitter/issues/1528
IMO it's not a bug in color scheme level, closed.
I have discovered something, polyglot and treesitter are conflicting to highlight the code. What happened is that: edge makes the selection (visual mode) background somehow transparent (here polyglot wins), but in case of the unselected line (treesitter highlighting wins).
I thought edge is the source of this issue because this issue doesn't happen with gruvbox colour scheme, but the real reason that it doesn't happen with gruvbox is the way that this colour scheme do the selected lines. it swaps the foreground and the background. that's it.
echo $TERM
: screentmux -V
: tmux 3.2avim --version
ornvim --version
:Minimal vimrc that can reproduce this bug
I will provide the minimal configuration (and steps) in each case in the Actual behaviour section.
Actual behaviour
edge alone
edge + nvim-treesitter/nvim-treesitter
edge + nvim-treesitter/nvim-treesitter + sheerun/vim-polyglot
The props of these tags are blue in, but when it is selected it turns to red.
Expected behaviour
In all cases, I expect the selected not selected lines to be the same, but this doesn't happen in the last case.