@@ -143,22 +143,8 @@ public struct SourceKitSourceItemData: LSPAnyCodable, Codable {
143
143
/// The language of the source file. If `nil`, the language is inferred from the file extension.
144
144
public var language : Language ?
145
145
146
- /// Whether the file is a header file that is clearly associated with one target.
147
- ///
148
- /// For example header files in SwiftPM projects are always associated to one target and SwiftPM can provide build
149
- /// settings for that header file.
150
- ///
151
- /// In general, build systems don't need to list all header files in the `buildTarget/sources` request: Semantic
152
- /// functionality for header files is usually provided by finding a main file that includes the header file and
153
- /// inferring build settings from it. Listing header files in `buildTarget/sources` allows SourceKit-LSP to provide
154
- /// semantic functionality for header files if they haven't been included by any main file.
155
- public var isHeader : Bool ? {
156
- guard let kind else {
157
- return nil
158
- }
159
- return kind == . header
160
- }
161
-
146
+ /// The kind of source file that this source item represents. If omitted, the item is assumed to be a normal source file,
147
+ /// ie. omitting this key is equivalent to specifying it as `source`.
162
148
public var kind : SourceKitSourceItemKind ?
163
149
164
150
/// The output path that is used during indexing for this file, ie. the `-index-unit-output-path`, if it is specified
@@ -201,10 +187,6 @@ public struct SourceKitSourceItemData: LSPAnyCodable, Codable {
201
187
if let kind {
202
188
result [ CodingKeys . kind. stringValue] = . string( kind. rawValue)
203
189
}
204
- // Backwards compatibility for isHeader
205
- if let isHeader {
206
- result [ " isHeader " ] = . bool( isHeader)
207
- }
208
190
if let outputPath {
209
191
result [ CodingKeys . outputPath. stringValue] = . string( outputPath)
210
192
}
0 commit comments