cameron-wags / rainbow_csv.nvim

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

Alignment Issues #15

Closed himanshu-39k closed 10 months ago

himanshu-39k commented 10 months ago

Hi, I am facing a slight issue, would appreciate your thoughts on this. if say I've a CSV data which contains a index field which would mean header would have trailing comma in it. Take a look in the following example:

,first,second,third,fourth
1,the,why,you,align
2,the,why,you,align
3,the,why,you,align

1,2&3 is the index number of the data.

Screenshot 2023-11-15 at 12 02 10 PM

Plugin is able to detect the correct order of colours when I'm not trying to align it. As we can see in the picture, it is colouring the index in the separate colour. But what happens when I try to align the data is:

first ,second ,third ,fourth 
    1 ,the    ,why   ,you    ,align 
    2 ,the    ,why   ,you    ,align 
    3 ,the    ,why   ,you    ,align 

It somehow align the index into first column and last column is orphan without any header for it. It kind of ignores the first comma of the header. VSCode rainbow plugin handles this properly. I hope I explained the issue rightfully. Do let me know if I missed anything. Will put in more detail if required. Thanks

cameron-wags commented 10 months ago

Hopefully this is resolved with #16. Thank you for the detailed report!