There are various previous threads on the forum:
http://www.lazarus.freepascal.org/index.php/topic,10260.0.htmlhttp://www.lazarus.freepascal.org/index.php/topic,7879.0.htmlhttp://www.lazarus.freepascal.org/index.php/topic,7338.0.htmlUnfortunately there is no tutorial, not even much documentation.
It depends on the exact feature your highlighter should have....
There are simpler highlighters that can be used to study the workings.
- LFM or Diff, both with folding
- SynAny / SynPosition (see examples in Laz)
There is a little bit of info on the wiki:
http://wiki.lazarus.freepascal.org/SynEdit_Highlighter#ReferencesIncludes the following info:
"If Highlight attributes are required SynEdit will request them per Line too. SynEdit will loop through individual tokens on a line. This currently happens from nested proc PaintLines in SynEdit.PaintTextLines. ....."
That is where you see how it is called. How it must return Result
In SynEdit is also a doc folder with tiny bits of info (on highlighters).
It does explain some of the names used, so read it, before trying to look at any of the existing highlighters.
-----
You will have to discover some on your own.
Because if I had the time to give a complete answer, I would already have written a tutorial.
If you have specific questions, then ask