From bc81e7719770c903930899285ba6b7e96a9c70e3 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 28 Dec 2019 17:34:38 -0800 Subject: 5838 - syntax highlighting for atom --- atom/Readme.md | 3 +++ atom/grammars/subx.json | 27 +++++++++++++++++++++++++++ atom/package.json | 17 +++++++++++++++++ atom/styles/styles.less | 16 ++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 atom/Readme.md create mode 100644 atom/grammars/subx.json create mode 100644 atom/package.json create mode 100644 atom/styles/styles.less (limited to 'atom') diff --git a/atom/Readme.md b/atom/Readme.md new file mode 100644 index 00000000..6abde7e8 --- /dev/null +++ b/atom/Readme.md @@ -0,0 +1,3 @@ +## Syntax highlighting for the Atom editor + +Copy or symlink this directory into `~/.atom/packages/subx`. diff --git a/atom/grammars/subx.json b/atom/grammars/subx.json new file mode 100644 index 00000000..d75ddda6 --- /dev/null +++ b/atom/grammars/subx.json @@ -0,0 +1,27 @@ +{ + "scopeName": "source.subx", + "name": "SubX", + "fileTypes": ["subx"], + "patterns": [ + { + "name": "comment.line.subx", + "match": "#.*" + }, + { + "name": "test.subx", + "match": "^test-[^ ]*:" + }, + { + "name": "global.subx", + "match": "^[A-Z][^ ]*:" + }, + { + "name": "function.subx", + "match": "^[^_$ #][^ ]*:" + }, + { + "name": "label.subx", + "match": "^[_$][^ ]*:" + } + ] +} diff --git a/atom/package.json b/atom/package.json new file mode 100644 index 00000000..a9936fc4 --- /dev/null +++ b/atom/package.json @@ -0,0 +1,17 @@ +{ + "name": "subx", + "version": "0.0.1", + "description": "Syntax highlighting for SubX files in the Mu computing stack.", + "author": "Kartik Agaram", + "keywords": [ + "language", + "mu", + "syntax", + "highlighting" + ], + "repository": "https://github.com/akkartik/mu", + "engines": { + "atom": ">=1.0.0 <2.0.0" + }, + "dependencies": {} +} diff --git a/atom/styles/styles.less b/atom/styles/styles.less new file mode 100644 index 00000000..e1a749a3 --- /dev/null +++ b/atom/styles/styles.less @@ -0,0 +1,16 @@ +atom-text-editor.editor { + .syntax--source.syntax--subx { + .syntax--function.syntax--subx { + color: orange; + } + .syntax--global.syntax--subx { + color: red; + } + .syntax--test.syntax--subx { + color: #88ff88; + } + .syntax--label.syntax--subx { + color: #448844; + } + } +} -- cgit 1.4.1-2-gfad0 (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122