-
Notifications
You must be signed in to change notification settings - Fork 67
Overwriting colors not getting applied #81
Comments
what happens if you add nvim-ts-rainbow/lua/rainbow/internal.lua Line 20 in 54ee09f
|
@p00f no differences I can see. sourceing the file and opening a clj file still shows the grouvbox colors I now have local parsers = require("nvim-treesitter.parsers")
local enabled_list = {"clojure", "fennel","racket"}
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
enable = true, -- false will disable the whole extension
disable = { "c", "rust" }, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
rainbow = {
enable = true,
colors = {
"#E06C75",
"#E5C07B",
"#98C379",
"#56B6C2",
"#61AFEF",
"#C678DD",
"#E06C75"
},
extended_mode = true,
print(vim.inspect(colors))
max_file_lines = nil,
disable = vim.tbl_filter(
function(p)
local disable = true
for _, lang in pairs(enabled_list) do
if p==lang then disable = false end
end
return disable
end, parsers.available_parsers()
)
}
}
|
no i mean the print statement should echo something to the message area, what does it echo? |
I get |
add it after this line |
ok put under that line but nothing. Not even |
Hm, I'm experiencing the same. I can only apply colors using vim.cmd as show in the readme, but the table I define inside treesitter is completely ignored. The code changed quite a bit since this suggestion. Any more ideas for debugging or where to put the print statement @p00f ??? |
While it doesn't solve the root issue, I have this workaround in my config: local rainbow = { "#CC8888", "#CCCC88", "#88CC88", "#88CCCC", "#8888CC", "#CC88CC" }
require "nvim-treesitter.configs".setup {
rainbow = { colors = rainbow, termcolors = rainbow }
}
for i, c in ipairs(rainbow) do -- p00f/rainbow#81
vim.cmd(("hi rainbowcol%d guifg=%s"):format(i, c))
end |
Describe the bug
if you try to overwrite the colures use in the rainbow part of the treessitter config the now colors will not get applied
Steps to reproduce
Steps to reproduce the behavior.
use this as your treesiter configuration
Expected behavior
I expected the the
()
,[]
, and{}
to have the colors above not the definition grouvbox colorsThe text was updated successfully, but these errors were encountered: