Open bradyt opened 5 years ago
This is a larger problem. As one expert on dart gitter puts it, any word can be scoped into a class member. Then should we make exception on any word that is preceded by a period? Should we also be making sure that no highlighting is done when in a member declaration position? Especially for variables, more so than methods, as it is idiomatic to have a font lock level one where only methods and builtins are highlighted. And variables are not highlighted until level three.
The case of of
is solved at https://github.com/bradyt/dart-mode/commit/bbeadaadff3810da2ab7a7159a3d9e268a39ea3d.
Another example, is get
at https://angulardart.dev/tutorial/toh-pt5.
Future<Hero> get(int id) async =>
(await getAll()).firstWhere((hero) => hero.id == id);
In
list.dart
in core,of
is the name of a method,whereas at the top the same file, we have
dart-mode
is incorrectly highlighting the method as a builtin.