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 {
565565 data: SourceKitSourceItemData ( isHeader: true ) . encodeToLSPAny ( )
566566 )
567567 }
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+ }
568589 result. append ( SourcesItem ( target: target, sources: sources) )
569590 }
570591 return BuildTargetSourcesResponse ( items: result)
@@ -760,3 +781,9 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
760781 return TextDocumentSourceKitOptionsResponse ( compilerArguments: compilerArgs)
761782 }
762783}
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