-
Notifications
You must be signed in to change notification settings - Fork 307
Refactor willEditDocument in favor of SourceEdits #1105
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
Refactor willEditDocument in favor of SourceEdits #1105
Conversation
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.
The overall design looks good to me. I’ve got a few mostly stylistic comments.
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’ve got a couple more nitpicky comments. Other than that we should use swiftlang/swift-syntax#2517 once that’s in and the PR is good to go 🚢
25c4dde
to
8aa915e
Compare
@swift-ci test |
@mustiikhalil Could you run swift-format on your changes? If you rebase it on top of current Also, would you mind squashing your commits? |
Removes willEditDocument completion block in favor of a returning SourceEdits instead.
8aa915e
to
f7f2cea
Compare
Sure! and done. I've noticed a weird behavior with command |
Hmm, weird. I’ve recently been running it from VS Code, which worked fine and I think I also saw it working in Xcode at some point. Maybe you didn’t give it permission to write to your source directory. Anyway, thanks for updating. |
@swift-ci Please test |
@swift-ci Please test Windows |
The following PR refactors the willEditDocument in the
SwiftLanguageServer
into theDocumentManager
focusing on using SourceEdit.Things I am not sure of:
Closes #939