Skip to content

Commit 9ba4920

Browse files
committed
Prepare 3rd blog post for summer of code summary posts (2025)
These were approved by their respective contributor co-authors over here in swiftlang#1191
1 parent 8ca4abf commit 9ba4920

File tree

5 files changed

+70
-0
lines changed

5 files changed

+70
-0
lines changed

_data/authors.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,9 @@ mitchellallison:
551551
email: mitchell_allison@apple.com
552552
github: mitchellallison
553553
about: "Mitchell Allison works on Distributed Systems in Swift at Apple."
554+
555+
ahmedelrefaey:
556+
name: Ahmed Elrefaey
557+
email: a7med.mahmoud2004@gmail.com
558+
github: a7medev
559+
about: Ahmed is a Google Summer of Code 2025 contributor, where he worked on improving the display of Swift documentation during code completion in SourceKit-LSP and VS Code.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
layout: new-layouts/post
3+
published: true
4+
date: 2025-02-NN 10:00:00
5+
title: 'Swift GSoC 2025 highlight: Improve the display of documentation during code completion in SourceKit-LSP
6+
author: [ktoso, ahmedelrefaey, hamish]
7+
category: "Community"
8+
---
9+
10+
Another year of successful Swift participation in [Google Summer of Code](https://summerofcode.withgoogle.com) 2025 came to an end recently, and this year we'd like to shine some light on the projects and work acomplished during the summer!
11+
12+
Summer of Code is an annual program, organized by Google, which provides hands-on experience for newcomers contributing
13+
to open source projects. Participants usually are students, but do not have to be.
14+
15+
In this series of four posts, we'll highlight each of the Summer of Code contributors and their projects.
16+
17+
- [Bringing Swiftly support to VS Code](2025-11-NN-swift-gsoc-2025-highlight-1-vscode-swiftly.md)
18+
- [JNI mode for swift-java’s source jextract tool](2025-11-NN-swift-gsoc-2025-highlight-2-swift-java-jextract-jni-mode.md)
19+
- Improve the display of documentation during code completion in SourceKit-LSP (this post)
20+
- [Improved Console Output for Swift Testing](2025-11-NN-swift-gsoc-2025-highlight-4-swift-testing-output.md)
21+
22+
---
23+
24+
## Improve the display of documentation during code completion in SourceKit-LSP
25+
26+
Hi everyone!
27+
28+
This is Ahmed Elrefaey, I’m excited to share with you an update on my GSoC project, Improve the display of documentation during code completion in SourceKit-LSP, mentored by Hamish Knight.
29+
30+
### Project Goals
31+
32+
The aim of this project is to enhance how documentation is displayed in SourceKit-LSP during code completion by:
33+
34+
1. Showing the full documentation for a code completion item instead of the first paragraph only, which we call “brief documentation”.
35+
2. Implementing Language Server Protocol’s [signature help](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp) request showing the user which overloads are available, along with their corresponding documentation.
36+
37+
### Progress
38+
39+
During this summer, we have made great progress on this project that I want to share with you.
40+
41+
We have successfully implemented full documentation comment retrieval for completion items by lazily retrieving the full documentation comment upon request to avoid having to fetch all documentation comments at once.
42+
43+
Here’s what SourceKit-LSP currently provides in VS Code (brief documentation):
44+
45+
![Brief documentation demo in VS Code.|690x412](/assets/images/gsoc-25/brief.gif)
46+
47+
And here’s how it looks with full documentation:
48+
49+
![Full documentation demo in VS Code.|690x412](/assets/images/gsoc-25/full.gif)
50+
51+
We have also implemented a large portion of signature help support, showing the available overloads and their corresponding documentation while editing.
52+
We reused the existing argument completion logic to determine the overloads and refactored the code completion item description implementation to reuse it in signature help.
53+
54+
Here’s a quick demo of signature help in VS Code.
55+
56+
![Signature help demo in VS Code|690x441](/assets/images/gsoc-25/output.gif)
57+
58+
### Closing Thoughts
59+
60+
I'm incredibly grateful for this opportunity to contribute to the Swift project, and I really learned a lot from this experience. I'd like to thank my mentor, Hamish Knight, for his unwavering support and guidance throughout this summer. I’d also like to thank Alex Hoppen, Rintaro Ishizaki, and Ben Barham for their valuable feedback during code review.
61+
62+
---
63+
64+
If you'd like to learn more about this project, please [check out the full post on the Swift forums](https://forums.swift.org/t/gsoc-2025-improve-the-display-of-documentation-during-code-completion-in-sourcekit-lsp/81976)!

assets/images/gsoc-25/brief.gif

1.53 MB
Loading

assets/images/gsoc-25/full.gif

3.12 MB
Loading

assets/images/gsoc-25/output.gif

4.34 MB
Loading

0 commit comments

Comments
 (0)