How to syntax highlight flutter class types?
sgon00 opened this issue · 5 comments
How to syntax highlight flutter class types?
For example, all the class types such as BuildContext, Scaffold etc.. All are pure white color. Thanks a lot.
Even if I am new to vim syntax highlight, since nobody reply me, I have to study how to do this by myself. I have created my own dart.vim and put it at ~/.vim/after/syntax/dart.vim. Note this is just an add-on for dart-vim-plugin, you still need to install it. Hopefully, this will help somebody some day.
Your approach is the correct one.
I'm not sure if it makes sense to keep that in the general Dart plugin or not, maybe the flutter team should release a plugin which extends the Dart syntax highlighting in this way?
cc @cbracken for thoughts
I suspect it's unlikely we'll put out a Flutter-specific vim plugin; those of us on the team who use vim mostly use it as-is.
The maintenance overhead would likely be relatively high--i.e. ensuring that whenever a new public class is added, it's also added to the vim plugin for highlighting--so the most reasonable way to deal with this would be some sort of automated tooling that regenerates the plugin code. I don't expect anyone on the team has time to make this happen at the moment.
Closing this as I don't think we want to ship with flutter specific keyword highlighting. The linked approach looks correct to me and can either be applied individually or someone from the community could publish it as a separate plugin.
Another option: https://gist.github.com/kika/7a3a37ab0edeb1cc54c225ff4fa00afc