-
Notifications
You must be signed in to change notification settings - Fork 71
Management of swiftinterface files #538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
209475f
to
fbfb4f1
Compare
@@ -1,6 +1,6 @@ | |||
# Changelog | |||
|
|||
## 1.3.0 - 2023-05-02 | |||
## 1.3.0 - 2023-05-03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has caught my date update for the CHANGELOG
(client: langclient.LanguageClient, cancellationToken: vscode.CancellationToken): Return; | ||
}) { | ||
if (!this.languageClient) { | ||
( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cleaned up useLanguageClient
a little because I was originally using this in the PR, but I'm not anymore. But the clean up is still valid I feel.
Currently if you right click on the
import module
text you can jump to a cleaned up version of its swift interface file with documentation. Eventually I hope SourceKit-LSP will be able to do this for any symbol from a framework we don't have source code for.In the meantime this PR helps this process by first adding a readonly document provider and using this when displaying swift interface files. A middleware is added to the LSP client to redirect the swiftinterface files to the read-only document provider. This means of course the user can't edit the files but also has the added bonus that sourcekit-lsp will not try to compile them (and most likely complain). Secondly I have also associated the extension
.swiftinterface
with the swift language so we get proper highlighting.