You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Just a small update, I managed to get LSP to attach when browsing the .swiftinterface file, but it attaches in "single file mode". Whether "single file mode" is something supported by sourcekit-lsp itself is not clear to me, it might as well be a feature of the editor. LSP does not attach when "single file mode" is disabled, my editor seems to think a .swiftinterface file is not part of a project.
Attaching LSP in single file mode does not make a difference in practice, LSP navigation still does not work.
Is there a way to make the LSP work with
.swiftinterface
files? For instance when I go to definition of aSwiftUI
symbol in my project, sayText
, I am directed to a generatedSwiftUI.swiftinterface
file located in a predefined path which can be seen by runningLater in this
SwiftUI.swiftinterface
file, if I try to go to definition of a symbol in anotherSwift
module, sayString
, 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 aSwift.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.The text was updated successfully, but these errors were encountered: