Skip to content

Commit 5ea5451

Browse files
committed
highlight opaque keyword
1 parent d99b615 commit 5ea5451

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
out
22
node_modules
33
.vscode-test/
4-
.vsix
4+
*.vsix

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ modify the `Zig Path` setting to point to the `zig` binary.
2121

2222
```
2323
npm install
24-
tsc src/extension.ts
24+
npm run compile
2525
npx vsce package
2626
```

syntaxes/zig.tmLanguage.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
},
136136
{
137137
"name": "keyword.structure.zig",
138-
"match": "\\b(struct|enum|union)\\b"
138+
"match": "\\b(struct|enum|union|opaque)\\b"
139139
},
140140
{
141141
"name": "keyword.statement.zig",
@@ -173,6 +173,14 @@
173173
}
174174
}
175175
},
176+
{
177+
"match": "[\\s\\(\\[\\{](\\.@\"[^\"]*\")(?!\\s*=[^>])",
178+
"captures": {
179+
"1": {
180+
"name": "variable.other.enummember.zig"
181+
}
182+
}
183+
},
176184
{
177185
"name": "keyword.default.zig",
178186
"match": "\\b(usingnamespace|test|and|or)\\b"

0 commit comments

Comments
 (0)