Wrong colors on ruby with treesitter
dansdantas opened this issue · 2 comments
dansdantas commented
Warning: I will close the issue without the minimal vimrc and the reproduce ways.
Problems summary
Colors on ruby files does not match what is expected, but on javascript it's the opposite.
Expected
Correct colors on both javascript and ruby files
Environment Information
- terminal: kitty 0.19.3
- vim/nvim version: NVIM v0.5.0-dev+1227-gb518b9076
Provide a minimal vim rc with less than 50 lines (Required!)
call plug#begin('~/.config/nvim/plugged')
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-rails'
Plug 'mhartington/oceanic-next'
call plug#end()
lua << EOF
require('nvim-treesitter.configs').setup({
ensure_installed = "maintained",
highlight = {
enable = true,
},
})
EOF
set termguicolors
set background=dark
syntax enable
colorscheme OceanicNext
The reproduce ways from neovim starting
- Open ruby file
- Open javascript file
- Open new terminal
- Remove line loading treesitter config
- Load new neovim instance
- Open ruby file
- Open javascript file
Screen shot (if possible)
Without treesitter
With treesitter
dansdantas commented
dansdantas commented
Patch if someone is interested.
diff --git a/colors/OceanicNext.vim b/colors/OceanicNext.vim
index 8b2cf41..d2e69be 100644
--- a/colors/OceanicNext.vim
+++ b/colors/OceanicNext.vim
@@ -128,12 +128,12 @@ endfunction
call s:hi('Function', s:blue, '', '', '')
call s:hi('Identifier', s:cyan, '', '', '')
- call s:hi('Include', s:blue, '', '', '')
+ call s:hi('Include', s:purple, '', '', '')
call s:hi('Keyword', s:purple, '', '', '')
call s:hi('Label', s:yellow, '', '', '')
call s:hi('Number', s:orange, '', '', '')
- call s:hi('Operator', s:base05, '', '', '')
+ call s:hi('Operator', s:orange, '', '', '')
call s:hi('PreProc', s:yellow, '', '', '')
call s:hi('Repeat', s:yellow, '', '', '')
call s:hi('Special', s:cyan, '', '', '')
@@ -166,26 +166,32 @@ endfunction
" TreeSitter stuff
- call s:hi('TSInclude', s:cyan, '', '', '')
+ call s:hi('TSInclude', s:purple, '', '', '')
call s:hi('TSPunctBracket', s:cyan, '', '', '')
- call s:hi('TSPunctDelimiter', s:base07, '', '', '')
+ call s:hi('TSPunctDelimiter', s:cyan, '', '', '')
+ call s:hi('TSPunctSpecial', s:cyan, '', '', '')
call s:hi('TSParameter', s:base07, '', '', '')
- call s:hi('TSType', s:blue, '', '', '')
- call s:hi('TSFunction', s:cyan, '', '', '')
+ call s:hi('TSType', s:yellow, '', '', '')
+ call s:hi('TSFunction', s:blue, '', '', '')
call s:hi('TSTagDelimiter', s:cyan, '', '', '')
- call s:hi('TSProperty', s:yellow, '', '', '')
+ call s:hi('TSProperty', s:base07, '', '', '')
call s:hi('TSMethod', s:blue, '', '', '')
call s:hi('TSParameter', s:yellow, '', '', '')
call s:hi('TSConstructor', s:base07, '', '', '')
- call s:hi('TSVariable', s:base07, '', '', '')
- call s:hi('TSOperator', s:base07, '', '', '')
+ call s:hi('TSVariable', s:base06, '', '', '')
+ call s:hi('TSOperator', s:orange, '', '', '')
call s:hi('TSTag', s:base07, '', '', '')
call s:hi('TSKeyword', s:purple, '', '', '')
call s:hi('TSKeywordOperator', s:purple, '', '', '')
call s:hi('TSVariableBuiltin', s:red, '', '', '')
call s:hi('TSLabel', s:cyan, '', '', '')
+ call s:hi('TSConditional', s:purple, '', '', '')
+ call s:hi('TSNamespace', s:base07, '', '', '')
+ call s:hi('TSSymbol', s:green, '', '', '')
+ call s:hi('TSException', s:red, '', '', '')
+
call s:hi('SpellBad', '', '', 'undercurl', '')
call s:hi('SpellLocal', '', '', 'undercurl', '')
call s:hi('SpellCap', '', '', 'undercurl', '')