Closed athuld closed 3 years ago
Unlike semantic highlighting in vscode which can modify colors in a specific file type
"semanticTokenColors": {
"operatorOverload": "#e78a4e",
"memberOperatorOverload": "#e78a4e",
"variable.defaultLibrary:javascript": "#d3869b",
"property.defaultLibrary:javascript": "#d3869b",
"variable.defaultLibrary:javascriptreact": "#d3869b",
"property.defaultLibrary:javascriptreact": "#d3869b",
"class:typescript": "#89b482",
"interface:typescript": "#89b482",
"enum:typescript": "#d3869b",
"enumMember:typescript": "#7daea3",
"namespace:typescript": "#d3869b",
"variable.defaultLibrary:typescript": "#d3869b",
"property.defaultLibrary:typescript": "#d3869b",
"class:typescriptreact": "#89b482",
"interface:typescriptreact": "#89b482",
"enum:typescriptreact": "#d3869b",
"enumMember:typescriptreact": "#7daea3",
"namespace:typescriptreact": "#d3869b",
"variable.defaultLibrary:typescriptreact": "#d3869b",
"property.defaultLibrary:typescriptreact": "#d3869b",
"intrinsic:python": "#d3869b",
"module:python": "#7daea3",
"class:python": "#89b482",
"macro:rust": "#89b482",
"namespace:rust": "#d3869b",
"selfKeyword:rust": "#d3869b"
},
the highlighting in nvim-treesitter will affect all file types and can't be changed only for a specific file type.
That's said, I can't optimize the highlighting in react js while NOT affecting the highlights in other file types.
So modifying tree-sitter highlights is not a good idea, this will cause many side effects.
I'd suggest you installing vim-polyglot and disable tree-sitter for react js and other file types that doesn't have a good overall highlighting, fall back to use the classic vim highlighting in these file type instead.
The classic vim highlighting has been carefully optimized for most of common file types, it should work fine in general, but the highlighting may not be as precise as it is in tree-sitter, this is restricted by the classic vim highlighting engine.
Another solution is that if you are using coc.nvim, you can try semantic highlighting provided by language server, it's very precise, but currently only a small amount of language servers support this feature.
Operating system/version
Arch Linux
Terminal emulator/version
ST ( simple terminal )
$TERM environment variable
st-256color
Tmux version
tmux 3.2a
Feature matrix
Minimal vimrc that can reproduce this bug.
Steps to reproduce this bug using minimal vimrc
Open up any react file and proper highlighting won't be there in any return statements
Expected behavior
The above image is from the everforest plugin in vs code and it has proper syntax highlighting
So i thought maybe it's my fault because of my neovim config but when i tried out another theme plugin proper syntax hightlighting was there.
The above image is from onenord theme on the same neovim configuration
Actual behavior
Below shows the actual behavior i'm getting from everforest theme on neovim with no proper syntax highlighting
P.S This is the same behaviour i'm getting from all your other themes also like edge and sonokai
Could you please look into this issue it would be a great help as everforest is the only theme my eyes are comfortable with