ap / vim-css-color

Preview colours in source code while editing
http://www.vim.org/scripts/script.php?script_id=5056
MIT License
1.77k stars 78 forks source link

Toml Support #159

Closed mcDevnagh closed 1 year ago

mcDevnagh commented 3 years ago

Hello, I would appreciate Toml support. Specifically for strings var = "#FFFFFF" see https://toml.io/en/

ap commented 3 years ago

Looks like cespare/vim-toml is the only relevant syntax. (I’ve found a few other projects but they’re all forks of this one.) Is that right or did I miss any alternatives?

Some realistic example file would also be quite useful.

mcDevnagh commented 3 years ago

Here are some examples from Amfora https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml https://github.com/makeworld-the-better-one/amfora/blob/master/contrib/themes/iceberg.toml

here's the output of my :syntax command

confTodo       xxx contained XXX FIXME TODO
                   links to Todo
confComment    xxx match /^#.*/  contains=confTodo
                   match /\s#.*/ms=s+1  contains=confTodo
                   links to Comment
confString     xxx start=/"/ skip=/\\\\\|\\"/ end=/"/  oneline
                   start=/'/ skip=/\\\\\|\\'/ end=/'/  oneline
                   links to String

vim-toml is much more in depth, and probably a better candidate

ap commented 3 years ago

What does :set syn? say when you open a TOML file?

mcDevnagh commented 3 years ago

syntax=toml

ap commented 1 year ago

This took a lot longer than it should have, but thanks to @IsmailmFahmy submitting #188, it is now supported. If you are still around waiting, well, first of all, sorry, but also, share and enjoy.