Skip to content

Commit 57337da

Browse files
committed
Add colon before inlay hints
1 parent a0c5fea commit 57337da

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ extension SwiftLanguageServer {
12331233
InlayHint(
12341234
position: info.range.upperBound,
12351235
kind: .type,
1236-
label: info.printedType
1236+
label: ": \(info.printedType)"
12371237
)
12381238
}
12391239

Tests/SourceKitLSPTests/InlayHintTests.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ final class InlayHintTests: XCTestCase {
7777
InlayHint(
7878
position: Position(line: 0, utf16index: 5),
7979
kind: .type,
80-
label: "Int"
80+
label: ": Int"
8181
),
8282
InlayHint(
8383
position: Position(line: 1, utf16index: 5),
8484
kind: .type,
85-
label: "String"
85+
label: ": String"
8686
),
8787
])
8888
}
@@ -106,12 +106,12 @@ final class InlayHintTests: XCTestCase {
106106
InlayHint(
107107
position: Position(line: 6, utf16index: 10),
108108
kind: .type,
109-
label: "Bool"
109+
label: ": Bool"
110110
),
111111
InlayHint(
112112
position: Position(line: 7, utf16index: 12),
113113
kind: .type,
114-
label: "Int"
114+
label: ": Int"
115115
)
116116
])
117117
}
@@ -137,27 +137,27 @@ final class InlayHintTests: XCTestCase {
137137
InlayHint(
138138
position: Position(line: 1, utf16index: 20),
139139
kind: .type,
140-
label: "Int"
140+
label: ": Int"
141141
),
142142
InlayHint(
143143
position: Position(line: 2, utf16index: 25),
144144
kind: .type,
145-
label: "String"
145+
label: ": String"
146146
),
147147
InlayHint(
148148
position: Position(line: 6, utf16index: 20),
149149
kind: .type,
150-
label: "String"
150+
label: ": String"
151151
),
152152
InlayHint(
153153
position: Position(line: 7, utf16index: 25),
154154
kind: .type,
155-
label: "Int"
155+
label: ": Int"
156156
),
157157
InlayHint(
158158
position: Position(line: 11, utf16index: 25),
159159
kind: .type,
160-
label: "Double"
160+
label: ": Double"
161161
),
162162
])
163163
}
@@ -189,22 +189,22 @@ final class InlayHintTests: XCTestCase {
189189
InlayHint(
190190
position: Position(line: 2, utf16index: 5),
191191
kind: .type,
192-
label: "(Int) -> ()"
192+
label: ": (Int) -> ()"
193193
),
194194
InlayHint(
195195
position: Position(line: 3, utf16index: 31),
196196
kind: .type,
197-
label: "String"
197+
label: ": String"
198198
),
199199
InlayHint(
200200
position: Position(line: 4, utf16index: 40),
201201
kind: .type,
202-
label: "Double"
202+
label: ": Double"
203203
),
204204
InlayHint(
205205
position: Position(line: 4, utf16index: 43),
206206
kind: .type,
207-
label: "Double"
207+
label: ": Double"
208208
)
209209
])
210210
}

0 commit comments

Comments
 (0)