about user defined CodeTree

SamC
Posts: 207
Joined: 12.08.2023 00:49

Post by SamC »

main Alexey wrote:1. it will affect the code-tree too.
Thus,is it possible to add a level feature for python by editing the Python.cuda-lexmap file?If so,it may be easier for me,could you please advise a simple example for this?
Thanks a lot!
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Post by main Alexey »

code-tree nodes must be added in 'lexer properties' dialog of SynWrite program.
https://wiki.freepascal.org/CudaText#Lexers_editing

first, copy file .lcf to the SynWRite's folder data/lexlib, then run SynWRite and edit the lexer. nodes must be added near the existing nodes (you will find all nodes in the UI-tab of dlg).

when done, pls rename your changed lexer to e.g. 'Python ex' (1. name of the file, 2. name inside .lcf file).
SamC
Posts: 207
Joined: 12.08.2023 00:49

Post by SamC »

Thanks for your help!I create a python tree helper and add the level lexer for python~
However,I find the lexer of function and class which originally on the code tree is disappeared. Does that mean the tree helper will replace the original code tree rather than just add new feasures on the tree?Is it possible to let them available at same time?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Post by main Alexey »

> Does that mean the tree helper will replace the original code tree rather than just add new feasures on the tree?

yes, it does.

>Is it possible to let them available at same time?

sorry, no, by design.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Post by main Alexey »

( I will miss your reply if you _edit_ the previous post; so always make a _new_ post in thread.)
Post Reply