Skip to content

Commit 142e97c

Browse files
committed
allow hyphenated namespaces
1 parent 159a9f9 commit 142e97c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Go/Go.sublime-syntax

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ contexts:
132132
# highlighting them as compiler pragmas could be misleading. We scope them
133133
# as plain comments by default, and add some detailed meta scopes for
134134
# enterprising users wishing to add more color.
135-
- match: (//)([a-z]+)(:)({{directive}})[ ]?
135+
- match: (//)([a-z]+[a-z-]*)(:)({{directive}})[ ]?
136136
captures:
137137
1: punctuation.definition.comment.go
138138
2: meta.keyword.annotation.go

Go/syntax_test_go.go

+9
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ You may have to disable Go-specific linters when working on this file.
7070
// ^^ meta.keyword.annotation.go
7171
// ^^^^^^^^ meta.variable.function.go
7272
// ^^^^^^^^^^^^^ meta.variable.parameter.go
73+
// ^ comment.line.go -meta.annotation
74+
75+
//go-sumtype:decl MySumType
76+
// ^ -comment -meta -punctuation
77+
// ^^ punctuation.definition.comment.go
78+
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.annotation.go comment.line.go
79+
// ^^^^^^^^^^ meta.keyword.annotation.go
80+
// ^^^^ meta.variable.function.go
81+
// ^^^^^^^^^ meta.variable.parameter.go
7382
// ^ comment.line.go -meta.annotation
7483

7584
//lint:ignore U1000 Reason.

0 commit comments

Comments
 (0)