Skip to content

Commit

Permalink
make sure union, struct, enum appear in symbol list
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenzek authored and aidenfoxivey committed Aug 10, 2024
1 parent aa5ee2f commit b7c70d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Syntaxes/Zig.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ contexts:
scope: constant.numeric.float.hexadecimal.zig
container_decl:
- match: '\b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*(?:union)\s*[(\{])'
scope: entity.name.union.zig
scope: entity.name.class.union.zig
- match: '\b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*(?:struct)\s*[(\{])'
scope: entity.name.struct.zig
scope: entity.name.class.struct.zig
- match: '\b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*(?:enum)\s*[(\{])'
scope: entity.name.enum.zig
scope: entity.name.class.enum.zig
- match: '\b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:error)\s*[(\{])'
scope: entity.name.error.zig
scope: entity.name.class.error.zig
- match: '\b(error)(\.)([a-zA-Z_]\w*|@\".+\")'
captures:
1: storage.type.error.zig
Expand All @@ -117,7 +117,7 @@ contexts:
- include: main
function_call:
- match: '\b([a-zA-Z_]\w*|@\".+\")(?=\s*\()'
scope: variable.function.zig
scope: meta.function-call.zig variable.function.zig
function_def:
- match: '\b(fn)\s+([a-zA-Z_]\w*|@\".+\")(\()'
captures:
Expand Down

0 comments on commit b7c70d5

Please sign in to comment.