sourcekit-lsp
sourcekit-lsp copied to clipboard
🚥 Implement Document Highlight for all return / throws (function/closure/accessor/init/deinit) and break / continue (for/while/repeat...while)
⚠️ Under Progress ⚠️
- Explanation:
Upgrades
textDocument/documentHighlightto highlight various return / throw statements corresponding to a function / closure / accessor / init / deinit, and break / continue statements corresponding to a loop, thereby allowing us to not wonder about which statements could cause an exit from a function or loop.
This also makes use of a new API introduced in SwiftLexicalLookup Library in Swift Syntax.
- Scope: This doesn't break existing code. This is Additive.
- Issues: Fixes: https://github.com/swiftlang/sourcekit-lsp/issues/2400
- Original PRs: This is the original PR. New API for Swift Syntax introduced in https://github.com/swiftlang/swift-syntax/pull/3216
- Risk: I don't think there's any risk associated with this new feature.
- Testing: Tests and Docs are yet to be written. The code & This PR description will also be polished.
- Reviewers: Suggested by @ahoppen and Open to be reviewed by anyone. Note: At the current state, the code is messy since I was focused on getting it to work, will polish it.
This is how it looks:
@lokesh-tr are you working on this problem?
@DPrakashhh yeah, i got some pushes to be made
@lokesh-tr Okay!