Closed Thom1729 closed 7 years ago
Please address all comments by @keith-hall and the warnings emitted by flake8. Other than that, this looks pretty good.
Oh yeah, sorry @Thom1729, I forgot to say I like the way you implemented it :) About the two shortcomings, I personally don't think anyone should ever have the captures above the corresponding regex, as its a bit odd, so I don't see that as a problem. Also the main use I have is with a single selection that doesn't span multiple lines so I don't see it as a problem that it only highlights the capture relating to the first selected line. Thanks for taking the time to work on this supremely useful feature :)
Everything should be good except for the settings. That, I think, should be factored out from HighlightTestViewEventListener
, but I'm not sure where in the project would be appropriate. Somewhere in /sublime_lib
?
We could probably factor out the following verification code for the style flags, though. Since sublime_lib
is effectively ours, it seems like an okay-ish place.
I committed a copy-paste of the existing implementation. It may be worth a new issue to abstract out some of Sublime's flag enums, including this one.
Thanks for this; squashed into b9711f50e8bcda448f50ee0052c78d08b867843d.
Implementation for #92.
Features:
Known shortcomings:
capture
is the last regexp before it in the file. There is surely a better solution.capture
lines in a single selection, only the capture group associated with the first line is highlighted. All relevant capture groups should be highlighted.Other remarks:
comment
scope, which I specified more or less at random. I'm not sure what the convention is.meta.group.capturing
for capturing groups).