Add rules for ini syntax?

Open source general-purpose IDE, lightweight text editor. Previously known as AutoGUI.
User avatar
kunkel321
Posts: 1045
Joined: 30 Nov 2015, 21:19

Add rules for ini syntax?

Post by kunkel321 » 29 Nov 2021, 15:25

I was able to change the syntax-highlighting colors for INI files by editing the relevant XML files. I can't find the rule definitions for the various file types though. Does anyone know how to access those? I'd like to add a few custom keywords, if possible.
ste(phen|ve) kunkel

User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Add rules for ini syntax?

Post by Alguimist » 30 Nov 2021, 15:09

These rules come from the Scintilla source code. You have to decompress the file "Adventure\Source\Scintilla-3.7.6.zip".

The identifiers and elements for the languages are defined in "scintilla\include\SciLexer.h". In the lexers folder, you will find the specifics for each language. So, for example, to determine the keyword groups available for batch files, you have to search for "WordList" in LexBatch.cxx, last match:

Code: Select all

static const char *const batchWordListDesc[] = {
	"Internal Commands",
	"External Commands",
	0
};
Then, in the file "Adventure\Themes\Specifics\Batch.xml", the keyword sets are grouped, 0-based id, in a correlation with the style elements "Word" and "Command".

Keywords for autocomplete must be defined in "Adventure\AutoComplete\". And, finally, the language identifiers can be found in "Adventure\Settings\FileTypes.xml".

Post Reply

Return to “Adventure IDE”