Description
Is there a way to make the LSP work with .swiftinterface
files? For instance when I go to definition of a SwiftUI
symbol in my project, say Text
, I am directed to a generated SwiftUI.swiftinterface
file located in a predefined path which can be seen by running
xcrun --toolchain swift sourcekit-lsp --help
Later in this SwiftUI.swiftinterface
file, if I try to go to definition of a symbol in another Swift
module, say String
, it doesn't navigate there and my editor (Neovim) falls back to finding occurrences in the current file. Also I don't see the LSP attached and LSP says it's running in "single file mode" when I'm in this .swiftinterface
file.
If I go back to my project files and try to navigate to String
from one of the project files, it navigates me to a Swift.String.swiftinterface
file in that same folder for generated interfaces. So I'm guessing there should be a way to send an LSP request for generating an interface even when the originating file is in that generated interfaces folder but I'm not sure how or whether LSP can be configured to do so.