Closed KrekkieD closed 7 months ago
The mark tag is obtained by parsing the syntax tree and obtaining comments for marking. If any text matches the Marks regex, there may be performance issues
do you think there'd be an easy enough way of maintaining performance but still allowing something like this? Or maybe leave it up to the user with a checkbox (i.e. [x] also search outside of comments (might impact performance)
), to decide if they want markers to run on all code instead of just on comments?
I don't know if a performance hit would be a guarantee, or if it would be more of a hypothetical problem that occurs on (primarily) excessively large files. You'd know better :)
it parsing principle is to use the IDE's psi model to achieve text highlighting, and then I can obtain this highlight value to achieve minimap highlighting. So theoretically, I can highlight everything that is parsed by the psi model, but the psi model does not parse based on the beginning of a line see this code
My guess is that this may be possible by finding the element type for <tag>
, but this implementation is too customized, and it is limited to the XML language only
okay, I understand the complexity. I also can't think of a way to easily handle this (aside from running regexes on the raw code). I'll have to stick with the code comments. Thanks for looking into it, though!
Hi,
I would really like it if the
Markers regex
would also be able to highlight things that are not code comments.For example: I work with angular and some of my HTML files have elements that point to a different element elsewhere in the file:
In this case it would be very helpful for me if I could add
<ng-template #
to theMarkers regex
so that the templates within the file show up in the minimap. Currently this only seems to work when I comment it out.