1# Syntax support file for the Lumina Text Editor
2# ===================================
3#  ReStructured Text language support rules
4#  Written by Ken Moore <ken@ixsystems.com>
5#  Released under the 2-clause BSD license
6# ===================================
7
8{
9	"meta": {
10		"name": "ReST",
11		"file_suffix": ["rst"]
12	},
13	"format": {
14		"line_wrap": false,
15		"highlight_whitespace_eol" : true,
16		"columns_per_line" : 72,
17		"font_type" : "monospace"
18	},
19	"rules": [{
20			"name": "directives",
21			"regex": "(\\s|^):[a-zA-Z0-9 ]*:`[^`]*`",
22			"foreground": "colors/class",
23			"font_weight": "bold"
24		},
25		{
26			"name": "hyperlinks",
27			"regex": "`[^\\<]*\\<[^\\>]*\\>`_",
28			"foreground": "colors/class",
29			"font_style": "italic"
30		},
31		{
32			"name": "code sample",
33			"regex": "\\b`{2}.*`{2}\\b",
34			"font_weight": "light"
35		},
36		{
37			"regex": "^\\.\\.\\sTODO\\b",
38			"font_weight" : "bold"
39		},
40		{
41			"regex": "^(\\s*)\\.\\.(\\s*)([a-zA-Z0-9]+)::",
42			"font_weight" : "bold"
43		},
44		{
45			"name" : "functions",
46			"regex" : "^(\\s*)\\.\\.(\\s*)\\b_[a-zA-Z0-9 ]*:(\\s|$)",
47			"foreground" : "colors/function"
48		},
49		{
50			"name" : "figures",
51			"regex" : "^(\\s*)\\.\\.\\sfigure::\\s",
52			"foreground" : "colors/keyword"
53		},
54		{
55			"name" : "properties",
56			"regex" : "^( ){3}:(.)*: ",
57			"foreground" : "colors/altkeyword"
58		},
59		{
60			"name" : "code block type 1",
61			"regex_start" : "\\:\\:$",
62			"regex_end" : "^(?=[^\\s])",
63			"foreground" : "colors/text"
64		},
65		{
66			"name" : "code block type 2",
67			"regex_start" : "^(\\s*)\\.\\.\\scode-block::\\s",
68			"regex_end" : "^(?=[^\\s])",
69			"foreground" : "colors/text"
70		},
71		{
72			"name" : "comment",
73			"regex_start" : "^(\\s*)\\.\\.\\s[^_](?![\\w-_\\.]+::(\\s|$))",
74			"regex_end" : "^(?=([^\\s]|$))",
75			"foreground" : "colors/comment"
76		}
77	]
78}
79