Clément 148 Posted February 3, 2022 Hello, I'm using D11 I need to create a custom highlighter with the following properties: * VariableList * FunctionList: must have () (open and close parenthesis) * Literals * constants Variables: SomeString, SomeInteger, SomeDouble should be highlighted as variable if they are in VariableList Functions: DateFormat( param1, param2 ), Date() should be highlighted as functions only when the '(' is typed; The following expression should be display like: c:\temp\DateFormat(Date(),"yyyy_mm_dd") and c:\temp\DateFormat( Date, "yyyy_mm_dd") // here Date is a variable I found some old code in the internet for older versions/branches of TSynEdit. I'm using the latest from Getit! Is there any example somewhere? Thanks Share this post Link to post
pyscripter 694 Posted February 4, 2022 (edited) - Update your SynEdit to the latest version from TurboPack/SynEdit: SynEdit is a syntax highlighting edit control, not based on the Windows common controls. (github.com) - Look at the SynGen folder. The file Highlighters-HowTo.htm explains the basic steps. You need to create a grammar file and then SynGen.exe will generate your highlighter. Edited February 4, 2022 by pyscripter 3 1 Share this post Link to post