Odysseus
(Vivek Rai)
1
Hey, swift community!
I'm Vivek, a junior year Computer Science and Engineering student at RGIPT, with three months of Swift development experience, including the creation of small-scale apps. My fascination with compilers and parsers has led me to SwiftSyntax and the prospect of improving code completion in Swift.
Project Overview:
This project aims to enhance code completion in Swift by leveraging swift-syntax. By analyzing Swift's grammar rules, we'll identify valid completions and implement algorithms to filter out irrelevant suggestions. Integration with SourceKit or SourceKit-LSP will ensure seamless transmission of results to Xcode.
Approach:
- Familiarize with SwiftSyntax to understand parsing and traversal capabilities.
- Analyze Swift's grammar rules to identify valid completions.
- Implement algorithms for contextual filtering to refine completion suggestions.
- Integrate completion engine with SourceKit or SourceKit-LSP for Xcode compatibility.
Expected Outcomes:
Comprehensive keyword and punctuator completions within the Swift syntax tree, minimizing manual maintenance and ensuring accuracy.
Timeline:
This is the general project flow I've come up after some reasearch:
- Weeks 1-2: Learn SwiftSyntax intricacies.
- Weeks 3-4: Analyze Swift's grammar rules.
- Weeks 5-6: Implement filtering algorithms.
- Weeks 7-8: Integrate with SourceKit/SourceKit-LSP.
- Weeks 9-10: Test, debug, and document.
- Weeks 11-12: Finalize project and documentation.
Conclusion:
This project offers a technical solution to enhance code completion in Swift, providing developers with a more efficient coding experience. I'm excited to contribute to this project and improve the Swift development ecosystem.
Thank you for considering my proposal! 
Warm regards,
Vivek
1 Like
Odysseus
(Vivek Rai)
2
Hey @ahoppen can I get some directions on how to get a head start at this project? What should i read up and experiment with to make my prototype? I'm pretty new to this, so some tips would be great!
ahoppen
(Alex Hoppen)
3
Hey @Odysseus,
Great to hear that you’re interested. I wrote a post about how to get started for GSoC last year that, I think, applies pretty well for this project as well. Implementing Incremental Re-Parsing in SwiftParser, GSoC 2023 - #2 by ahoppen . Let me know if you’ve got any concrete questions.
1 Like
Odysseus
(Vivek Rai)
4
Thanks! I'll be sure to check it out.
1 Like