Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T03:31:37.537Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

default_semantic_token_rules.json

247 lines · 6.5 KB · json
1// Default semantic token rules for Omega (read-only).
2//
3// These rules map LSP semantic token types to syntax theme styles.
4// To customize, add rules to "semantic_token_rules" in your settings.json.
5// User-defined rules are prepended and take highest precedence.
6// Extension language rules are applied next.
7// These built-in defaults are applied last.
8//
9// Each rule has the following properties:
10// - `token_type`: The LSP semantic token type to match. If omitted, matches all types.
11// - `token_modifiers`: A list of LSP semantic token modifiers to match. All must be present.
12// - `style`: A list of syntax theme styles to try. The first one found is used.
13// - `foreground_color`: Override foreground color in hex format (e.g., "#ff0000").
14// - `background_color`: Override background color in hex format.
15// - `underline`: Boolean or color to underline with. If `true`, uses text color.
16// - `strikethrough`: Boolean or color. If `true`, uses text color.
17// - `font_weight`: One of "normal", "bold".
18// - `font_style`: One of "normal", "italic".
19//
20// See the VSCode docs [1] and the LSP Spec [2] for reasoning behind these defaults.
21//
22// [1]: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers
23// [2]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokenTypes
24[
25  // Types
26  {
27    "token_type": "namespace",
28    "token_modifiers": [],
29    "style": ["namespace", "module", "type"],
30  },
31  {
32    "token_type": "class",
33    "token_modifiers": ["declaration"],
34    "style": ["type.class.definition", "type.definition"],
35  },
36  {
37    "token_type": "class",
38    "token_modifiers": ["definition"],
39    "style": ["type.class.definition", "type.definition"],
40  },
41  {
42    "token_type": "class",
43    "token_modifiers": [],
44    "style": ["type.class", "class", "type"],
45  },
46  {
47    "token_type": "enum",
48    "token_modifiers": ["declaration"],
49    "style": ["type.enum.definition", "type.definition"],
50  },
51  {
52    "token_type": "enum",
53    "token_modifiers": ["definition"],
54    "style": ["type.enum.definition", "type.definition"],
55  },
56  {
57    "token_type": "enum",
58    "token_modifiers": [],
59    "style": ["type.enum", "enum", "type"],
60  },
61  {
62    "token_type": "interface",
63    "token_modifiers": ["declaration"],
64    "style": ["type.interface.definition", "type.definition"],
65  },
66  {
67    "token_type": "interface",
68    "token_modifiers": ["definition"],
69    "style": ["type.interface.definition", "type.definition"],
70  },
71  {
72    "token_type": "interface",
73    "token_modifiers": [],
74    "style": ["type.interface", "interface", "type"],
75  },
76  {
77    "token_type": "struct",
78    "token_modifiers": ["declaration"],
79    "style": ["type.struct.definition", "type.definition"],
80  },
81  {
82    "token_type": "struct",
83    "token_modifiers": ["definition"],
84    "style": ["type.struct.definition", "type.definition"],
85  },
86  {
87    "token_type": "struct",
88    "token_modifiers": [],
89    "style": ["type.struct", "struct", "type"],
90  },
91  {
92    "token_type": "typeParameter",
93    "token_modifiers": ["declaration"],
94    "style": ["type.parameter.definition", "type.definition"],
95  },
96  {
97    "token_type": "typeParameter",
98    "token_modifiers": ["definition"],
99    "style": ["type.parameter.definition", "type.definition"],
100  },
101  {
102    "token_type": "typeParameter",
103    "token_modifiers": [],
104    "style": ["type.parameter", "type"],
105  },
106  {
107    "token_type": "type",
108    "token_modifiers": ["declaration"],
109    "style": ["type.definition"],
110  },
111  {
112    "token_type": "type",
113    "token_modifiers": ["definition"],
114    "style": ["type.definition"],
115  },
116  {
117    "token_type": "type",
118    "token_modifiers": [],
119    "style": ["type"],
120  },
121  // References
122  {
123    "token_type": "parameter",
124    "token_modifiers": [],
125    "style": ["variable.parameter"],
126  },
127  {
128    "token_type": "variable",
129    "token_modifiers": ["defaultLibrary", "constant"],
130    "style": ["constant.builtin"],
131  },
132  {
133    "token_type": "variable",
134    "token_modifiers": ["defaultLibrary"],
135    "style": ["variable.builtin"],
136  },
137  {
138    "token_type": "variable",
139    "token_modifiers": ["constant"],
140    "style": ["constant"],
141  },
142  {
143    "token_type": "variable",
144    "token_modifiers": [],
145    "style": ["variable"],
146  },
147  {
148    "token_type": "property",
149    "token_modifiers": [],
150    "style": ["property"],
151  },
152  {
153    "token_type": "enumMember",
154    "token_modifiers": [],
155    "style": ["type.enum.member", "type.enum", "variant"],
156  },
157  {
158    "token_type": "decorator",
159    "token_modifiers": [],
160    "style": ["function.decorator", "function.annotation", "attribute"],
161  },
162  // Declarations in the docs, but in practice, also references
163  {
164    "token_type": "function",
165    "token_modifiers": ["defaultLibrary"],
166    "style": ["function.builtin"],
167  },
168  {
169    "token_type": "function",
170    "token_modifiers": [],
171    "style": ["function"],
172  },
173  {
174    "token_type": "method",
175    "token_modifiers": ["defaultLibrary"],
176    "style": ["function.builtin"],
177  },
178  {
179    "token_type": "method",
180    "token_modifiers": [],
181    "style": ["function.method", "function"],
182  },
183  {
184    "token_type": "macro",
185    "token_modifiers": [],
186    "style": ["function.macro", "function"],
187  },
188  {
189    "token_type": "label",
190    "token_modifiers": [],
191    "style": ["label"],
192  },
193  // Tokens
194  {
195    "token_type": "comment",
196    "token_modifiers": ["documentation"],
197    "style": ["comment.documentation", "comment.doc"],
198  },
199  {
200    "token_type": "comment",
201    "token_modifiers": [],
202    "style": ["comment"],
203  },
204  {
205    "token_type": "string",
206    "token_modifiers": ["documentation"],
207    "style": ["string.doc"],
208  },
209  {
210    "token_type": "string",
211    "token_modifiers": [],
212    "style": ["string"],
213  },
214  {
215    "token_type": "keyword",
216    "token_modifiers": [],
217    "style": ["keyword"],
218  },
219  {
220    "token_type": "number",
221    "token_modifiers": [],
222    "style": ["number"],
223  },
224  {
225    "token_type": "regexp",
226    "token_modifiers": [],
227    "style": ["string.regexp", "string"],
228  },
229  {
230    "token_type": "operator",
231    "token_modifiers": [],
232    "style": ["operator"],
233  },
234  // Not in the VS Code docs, but in the LSP spec.
235  {
236    "token_type": "modifier",
237    "token_modifiers": [],
238    "style": ["keyword.modifier"],
239  },
240  // C#
241  {
242    "token_type": "event",
243    "token_modifiers": [],
244    "style": ["type.event", "type"],
245  },
246]
247
Served at tenant.openagents/omega Member data and write actions are omitted.