cameron-wags / rainbow_csv.nvim

Neovim port of mechatroner/rainbow_csv
MIT License
94 stars 4 forks source link

Doesn't color a csv file. #19

Open vinoff opened 9 months ago

vinoff commented 9 months ago

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?

cameron-wags commented 9 months ago

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.

indeedhat commented 8 months ago

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

cameron-wags commented 8 months ago

@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.

indeedhat commented 8 months ago

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.

indeedhat commented 8 months ago

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.

indeedhat commented 8 months ago

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