Description
In SwiftLanguageServer
, there are a few cases where sourcekitd files are opened using source.request.editor.open
, but these file names are prepended by an extra string to indicate that they are not directly related to a file URI. Below is a snippet as well as the lines where this occurs:
let skreq = SKDRequestDictionary(sourcekitd: self.sourcekitd)
skreq[keys.request] = self.requests.editor_open
skreq[keys.name] = "FoldingRanges:" + snapshot.document.uri.pseudoPath
skreq[keys.sourcetext] = snapshot.text
skreq[keys.syntactic_only] = 1
https://github.com/apple/sourcekit-lsp/blob/main/Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift#L664
https://github.com/apple/sourcekit-lsp/blob/main/Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift#L761
https://github.com/apple/sourcekit-lsp/blob/main/Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift#L967
These documents don't seem to have a source.request.editor.close
, so they are likely never closed and remain open for the duration of the SourceKit-LSP session.