Doesn't color a csv file.
I am using this plugin for the "rainbow" part of it. I want each CSV entry to be a different color. This is not happening.
I am using this test file:
Name,Age,Occupation
John Doe,28,Data Scientist
Jane Doe,34,Software Engineer
Max Mustermann,45,Project Manager
Erika Mustermann,32,UI/UX Designer
I am using latest version of NVim. It installed properly and I am able to use RainbowDelim and such. However, no rainbow. Is there anything I need to do to CSVs colored?
I'm not having highlighting issues opening that file using a minimal init.lua.
Any chance you're using nvim-treesitter's highlight module? If so, you'll want to turn it off for CSV filetypes using one of the methods described in #13.
I am having the same issue, i was indeed using treesitter highlight but i have disabled it for csv files and now i get no colouration at all.
It appears as if the plugin isn't starting at all as i don't get access to the plugins :commands
@indeedhat Could I see the parts of your config related to this plugin? Sounds like the plugin truly isn't loading for you.
I'm not having issues using this init.lua on nvim nightly:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
'cameron-wags/rainbow_csv.nvim',
config = true,
ft = {
'csv',
'tsv',
'csv_semicolon',
'csv_whitespace',
'csv_pipe',
'rfc_csv',
'rfc_semicolon'
},
cmd = {
'RainbowDelim',
'RainbowDelimSimple',
'RainbowDelimQuoted',
'RainbowMultiDelim'
},
},
}, {})
@vinoff Still having the issue? If so, I'd like to see the config that's causing this.
Yeah that is what i was thinking too.
Im using packer and this is the relevent part of the config. I have tried with the lazy stuff commented out and enabled.
use {
'cameron-wags/rainbow_csv.nvim',
config = function()
require 'rainbow_csv'.setup()
end,
-- -- optional lazy-loading below
-- module = {
-- 'rainbow_csv',
-- 'rainbow_csv.fns'
-- },
-- ft = {
-- 'csv',
-- 'tsv',
-- 'csv_semicolon',
-- 'csv_whitespace',
-- 'csv_pipe',
-- 'rfc_csv',
-- 'rfc_semicolon'
-- }
}
Ill try running it with a bare minimum config using packer and see what happens.
it works with your lazy config but not a bare bones packer one.
TBH now that its no longer maintained ive been meaning to swap to something else, maybe this should be my push.
I ended switching to lazy.nvim last night and it works fine with the rest of my config so the issue (at least for me) seems to be related to packer
In my case, the problem was that nvim-treesitter had the auto_install = true parameter, which automatically installed the csv language. This created a conflict with the rainbow plugin.
To check if the csv language is installed, use the :TSModuleInfo command.
To fix this:
- Remove the
csvlanguage with the:TSUninstall csvcommand. - Choose one of the following options:
- Disable automatic language installation: Set
auto_install = falsein your treesitter configuration. - Exclude the
csvlanguage from automatic installation: Addignore_install = { 'csv' }to your treesitter configuration.
- Disable automatic language installation: Set