Page 1 of 1

ATSynEdit: highlight start and end brackets

Posted: 07.09.2019 16:59
by ruma1974
I am not sure if "highlighting (e.g. by bold or underline) start and end bracket/quote/parenthesis" is an option for the ATsynedit or if it can be specified in a lexer and how to do it. I did not see it implemented in any of the demos for ATsynedit nor in CudaText.

I find this feature very useful for many languages especially for the brackets.

Thanks,

Rune

Posted: 08.09.2019 06:41
by Alexey
You can hilite brackets in 2 ways
1-- in the lexer properties, add Range: opening rule finds (, closing rule finds ), 2 rules are linked. Then for this Range, set it to highlight range tokens, only bounding tokens of range. It is option in the lexer props dialog in Synwrite.

2-- find brackets by pascal code, then use ATSynEdit.Attribs object
https://wiki.freepascal.org/ATSynEdit#Attribs_object

Posted: 08.09.2019 18:03
by ruma1974
I ended up using method to using the add marks function because I do not fully master the lexer syntax.

Thanks,

Rune