The syntax highlight is done by CloudyForest, which is embedded into the app as a shared library. In CloudForest, all syntax template is stored in syntax folder.

Create a new file

CloudForest will search for text files inside the folder called “syntax” in the same directory as CloudForest app.

Screenshot from 2025-08-27 20-44-49.png

The screenshot is from https://github.com/crslancpl/CloudForest source code. It has js.txt, demo.txt, py.txt, and cpp.txt in it. Now, click on the button in the bottom left corner of the edit area that shows the language, it will show all the syntax templates’ name and let you choose it.

Screenshot from 2025-08-27 21-02-32.png

Now, we need to create a new syntax template. If there is demo.txt in your syntax folder, open it and copy all the things to a new file. The content of demo.txt is here

#TrimSpecialCharacter
#Keyword
#Type
#SLCmt
#MLCmtS
#MLCmtE
#TagSymbol
#Tags
#TextSymbol

All tags are optional. You can leave them all blank.

Let’s assume we have a language that looks like this:

text a = "a text"
a = 'abc'
number b = 1
//single line comment
if a == "a text" then
/*
* multiline comment
*/

text and number are types. if and then are keywords. " and 'wrapped a string. \\\\ starts a single line comment. \\* starts a multi line comment and *\\ ends it.

#TrimSpecialCharacter is added if you want CloudyForest to separate special characters from normal alphabet codes (e.g. period in class.child). In this case, we need special characters to be separated.

SLCmt stands for “single line comment”. MLCmtS stands for “multi line comment start”, so MLCmtE stands for “multi line comment end”.

#TrimSpecialCharacter
#Keyword
if then
#Type
text number
#SLCmt
//
#MLCmtS
/*
#MLCmtE
*/
#TextSymbol
" '

Add a new line after the last line to reduce error. Now, save it under syntax folder with the name you want. We will name it “mylang.txt”. Your file extension doesn’t have to be txt, but it has to be in plain text format.

Open CloudForest again, and you should see a “mylang” in the language chooser. Click it and close the chooser. You will see your own syntax highlight.

Screenshot from 2025-08-27 21-41-30.png