Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Rainbow columns #6

Open
MahouShoujoMivutilde opened this issue Jan 24, 2024 · 1 comment
Open

[Enhancement] Rainbow columns #6

MahouShoujoMivutilde opened this issue Jan 24, 2024 · 1 comment

Comments

@MahouShoujoMivutilde
Copy link

Just saw rainbow_csv and thought highlighting different columns based on order instead of value type (which probably will be the same in a given column) might be a better default.

Rainbow CSV Screenshot

What do you think?

@markstos
Copy link

There's already another tree sitter grammar just for Rainbow CSV parsing:

https://github.com/weartist/rainbow-csv-tree-sitter

The related zed-rainbow-csv project provides the highlights.scm file to use:

; Literals
(second)@keyword
(third)@function.method
(fourth)@number
(fifth)@comment
(sixth)@type
(seventh)@operator

From looking at the code above, we can see how it works: The first column is not colored, and the second is colored as a keyword, the third as a method and so on.

I'd have to read their source to see what happens after the seventh column, lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants