• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..31-Jan-2020-

README.mdH A D31-Jan-20203.9 KiB4639

cpp.syntaxH A D31-Jan-20201.9 KiB6967

go.syntaxH A D31-Jan-20201.3 KiB5048

html.syntaxH A D31-Jan-20201.6 KiB7573

java.syntaxH A D31-Jan-20201.8 KiB6462

javascript.syntaxH A D31-Jan-20201.3 KiB5553

json.syntaxH A D31-Jan-2020805 3634

md.syntaxH A D31-Jan-20202.5 KiB104102

php.syntaxH A D31-Jan-20201.4 KiB5048

python.syntaxH A D31-Jan-20201.5 KiB5755

rst.syntaxH A D31-Jan-20201.7 KiB7977

sh.syntaxH A D31-Jan-20202.2 KiB6462

txt.syntaxH A D31-Jan-2020411 1917

xml.syntaxH A D31-Jan-20201.6 KiB7674

README.md

1Information about the syntax highlighting rules:
2
3# General File format
4The bulk of the file is a JSON text structure, with the exception of a small comments section at the top where every line starts with a "#".
5
6# Comments
7A small comment section may be placed at the top of the file where every line starts with a "#". This is not a part of the JSON format, but instead something that the Lumina text editor will scan for and remove prior to loading the rest of the file as a JSON document.
8
9# Requirements
101. A "meta" object containing the following variables (meta information about the rules):
11   1. "name" : The name that will be shown to the user for this set of syntax rules.
12   2. If this syntax file is to be automatically applied to particular file type, then at least one of the following options must be set:
13      1. "file_suffix" : An array of file extensions which are supported by this syntax rule set (Example: temp.foo will be matched by "file_suffix"=["foo"] )
14      2. "file_regex" : A regular expression which should be used to find if the filename matches this rule set.
15      3. "first_line_match" : *(only used if no filename rules matched)* Exact match for the first line of text in the file (Example: "#!/bin/sh")
16      4. "first_line_regex" : *(only used if no filename rules matched)* Regular expression to use when find a match for the first line of text in the file
172. A "format" object containing the following variables (file-wide formatting):
18   1. "columns_per_line" : (integer, optional) For file formats with line-length restrictions, this will automatically highlight/flag any "overage" of the designated limit.
19   2. "highlight_whitespace_eol" : (boolian, optional) Highlight any excess whitespace at the end of a line.
20   3. "font_type" : (optional) One of the following ["all", "monospace"]. This is for assisting with file formats that need characters to line up within the file (all columns are in the same place per line, etc).
21   4. "line_wrap" : (boolian) Automatically enable/disable line wrapping for this type of file
22   5. "tab_width" : (integer - 8 by default) Have tabs automatically take up this many characters.
233. A "rules" array containing each of the individual rules (earlier rules are applied before later ones). The required fields for a rule are:
24   1. "name" : Not directly used by LTE (yet) - but is useful for noting the purpose of each rule
25   2. Exactly **one** of the following options must also be included:
26      1. "words" : Array of exact words/text which should be matched (automatically converted to a regular expression with a break on either side of the word)
27      2. "regex" : single-line regular expression to be used for finding matching text
28      3. "regex_start" **and** "regex_end" : multi-line regular expression. Everything between the start/end matches will be highlighted.
29   3. At least **one** of the following fields should also be supplied:
30      1. "foreground" : Font color of the matching text (see the Colors section for additional information)
31      2. "background" : Highlighting color of the matching text (see the Colors section for additional information)
32      3. "font_weight" : One of the following ["bold","normal", "light"]. Changes the thickness of the font for the matching text
33      4. "font_style" : One of the following ["italic", "normal"]. Change the style of the font fo the matching text.
34
35# Colors
36There are a number of built-in colors which may be defined by the user, and these can be used by passing in the following:
37`"colors/[name of color]"`
38The currently-valid colors are: ["keyword", "altkeyword", "class", "text", "function", "comment", "bracket-found", "bracket-missing"].
39
40Alternatively, an RGB (0-255) or Hex color code may be used instead (please limit this though - it can conflict with the user's preferred color scheme quite badly)
41
42Examples:
43 `"foreground" : "rgb(10,10,255)"`
44 `"background" : "colors/text"`
45 `"foreground" : "#0F0F0F"`
46