Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Incidentally there is not a c.vim files anywhere in my ~/.vim. I did as you said and also tried u/Departure-Silver suggested and now I can finally see some color in my C files! Thanks for your time and detailed answer, sry if I was edgy earlier 😅 now that my stuff works I am a better person. One more thing, would it have any benefits to polyglot at this point? I am a student and have to learn C and some other languages properly
Even though we're on r/vim, many people here actually use Neovim, so I have to ask: do you have tree-sitter? If so, you need to enable the additional_vim_regex_highlighting option of the highlight module in nvim-treesitter since vim-css-color depends on Vim's syntax highlighting rather than Neovim's. An alternative would be to use a Neovim plugin that does the same thing with tree-sitter support – e.g nvim-colorizer (I haven't tested it at all).
I used to use https://github.com/jeaye/color_coded, which is good, but it has a ton of extra dependencies to install, and my experience was that it would get confused sometimes in non c files.
This is the main reason I switched to neovim, and the syntax highlighting for c, among other things, is great. Treesitter for neovim is what i currently use: https://github.com/nvim-treesitter/nvim-treesitter
Check this out: https://github.com/ap/vim-css-color/issues/85
This plugin works like a charm in Vim, regardless of the language: https://github.com/BourgeoisBear/clrzr