File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Sources/BuildSystemIntegration Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,27 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
565
565
data: SourceKitSourceItemData ( isHeader: true ) . encodeToLSPAny ( )
566
566
)
567
567
}
568
+ sources += swiftPMTarget. resources. map {
569
+ SourceItem (
570
+ uri: DocumentURI ( $0) ,
571
+ kind: $0. isDirectory ? . directory : . file,
572
+ generated: false ,
573
+ )
574
+ }
575
+ sources += swiftPMTarget. ignored. map {
576
+ SourceItem (
577
+ uri: DocumentURI ( $0) ,
578
+ kind: $0. isDirectory ? . directory : . file,
579
+ generated: false ,
580
+ )
581
+ }
582
+ sources += swiftPMTarget. others. map {
583
+ SourceItem (
584
+ uri: DocumentURI ( $0) ,
585
+ kind: $0. isDirectory ? . directory : . file,
586
+ generated: false ,
587
+ )
588
+ }
568
589
result. append ( SourcesItem ( target: target, sources: sources) )
569
590
}
570
591
return BuildTargetSourcesResponse ( items: result)
@@ -760,3 +781,9 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
760
781
return TextDocumentSourceKitOptionsResponse ( compilerArguments: compilerArgs)
761
782
}
762
783
}
784
+
785
+ fileprivate extension URL {
786
+ var isDirectory : Bool {
787
+ ( try ? resourceValues ( forKeys: [ . isDirectoryKey] ) ) ? . isDirectory == true
788
+ }
789
+ }
You can’t perform that action at this time.
0 commit comments