Home Download Buy Blog Forum Support

Syntax highlighting programmatically

Syntax highlighting programmatically

Postby hibbelig on Wed Dec 28, 2011 9:33 pm

Is there a way, other than by doing regular expression matching on the buffer content, to influence the syntax highlighting? I am writing a plugin that inserts text into a buffer, and the plugin knows exactly which text it is inserting, so it can do the syntax highlighting quite easily. If I have to use regex matching, then I have to think up an easy-to-parse syntax for the buffer, which kind of sucks...

I tried to use add_regions, but that didn't have the desired effects. See also this post: viewtopic.php?f=6&t=4344

Now I was thinking maybe I can add markup to the buffer and then have the syntax highlighting hide the markup? But I couldn't find a way to specify that something should be invisible in the *.tmTheme file or in the syntax definition...
hibbelig
 
Posts: 77
Joined: Wed Dec 21, 2011 11:24 pm

Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests