Groovy-Emacs-Modes / groovy-emacs-modes

A groovy major mode, grails minor mode, and a groovy inferior mode.
84 stars 39 forks source link

Fix var highlighting #88

Closed vincekd closed 7 years ago

vincekd commented 7 years ago

highlight variable declarations and assignments

[fix #85]

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.3%) to 93.976% when pulling 1cee8b749eace66ce3e9a5772bda54b69a4d2058 on vincekd:fix-var-highlighting into 606d6216c291c96f948e04ca481962c326771cf7 on Groovy-Emacs-Modes:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.6%) to 94.286% when pulling cd27456e85864dc06d2feeac3e772a7941891b57 on vincekd:fix-var-highlighting into 606d6216c291c96f948e04ca481962c326771cf7 on Groovy-Emacs-Modes:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.6%) to 94.286% when pulling 97885fbb38bd8d8f1eba700eb7efc5a899a7321e on vincekd:fix-var-highlighting into 606d6216c291c96f948e04ca481962c326771cf7 on Groovy-Emacs-Modes:master.

vincekd commented 7 years ago

so I'm not sure if this is the best way to do this, but I folded all variable highlighting into a single function that works correctly even in some edge cases:

Also added a bunch of unit tests for highlighting variables.