[GSoC-2026] Proposal Review: DocC Language Features in SourceKit-LSP

Hey @matthewbastien @snprajwal

I am a Computer Science student from India. I would like to work on this project. I have drafted my proposal and would appreciate any feedback or suggestions before submitting it. I was also wondering if, based on the additional features mentioned in my proposal, the project could potentially be considered for a large project scope.
Proposal Link

To discuss the implementation plan in detail I had started a thread here: Link
It would be great if you could take a look whenever you have time and share your thoughts.

1 Like

Hello @padmashree06!

Thank you for your interest in this project! I reviewed your proposal along with @snprajwal. This is a really good start, but we have some suggestions for how it can be improved. In general, I would say that most of these features should be implemented in SourceKit-LSP so that we can get support across all editors rather than just VS Code.

Section 4.1: The approach you described for handling the documentation links won't work for all cases. The symbol search in VS Code is a workspace wide search and documentation links in DocC can be too vague to resolve by the name alone. Consider the following example:

/// A protocol for a test that specifies a ``type``.
protocol Test {
    let type: String
}

In this example, your approach would perform a symbol search for type which, for the average repository, will have many many results with no way to distinguish which one we really want. It would be better to have SourceKit-LSP handle this when it performs symbol resolution on behalf of SwiftDocC because it knows that the documentation request was made for the Test protocol which contains a member called type. VS Code only knows the location of the cursor and the file that it sent to SourceKit-LSP. Have a look at the DocCReferenceResolutionService to see how SwiftDocC asks SourceKit-LSP to resolve references.

Section 4.2: We like the idea of showing an error if a link isn't valid. However, ideally SourceKit-LSP wouldn't show the link at all if it doesn't exist. We'd rather see see diagnostics in the editor and problems view if SourceKit-LSP cannot resolve symbols kind of like what you talk about in Section 4.5. That way a user doesn't have to click through all the links to see if they're valid. For example, the following code snippet should underline foobar in red and explain that the symbol could not be found:

/// A class that contains a property ``foobar``.
class Foo {
    let bar: String
}

Section 4.3: Go to definition is part of the LSP specification and should be handled by SourceKit-LSP. SourceKit-LSP would also need to report symbols in Markdown/tutorial files as well as in-source documentation for this to work.

Section 4.6: This is a pretty cool idea. The only issue I see with your suggested solution is that we should get the content of the hover from SwiftDocC somehow instead of hardcoding it in SourceKit-LSP. That way there's less need to coordinate in the future between the two repos. I'm not sure if something like that already exists or needs to be added to SwiftDocC.

We'd be fine with making this a large project given the number of features. However, it's also possible to just pare down the scope a little bit. The three most important parts of this project are go to definition, diagnostics, and link navigation. The others can be set as stretch goals that won't impact the pass/failure status of the project. It's up to you on whether or not you want to commit to doing all of the proposed features.

Please let us know if you have any questions or if you update the proposal!

2 Likes

@matthewbastien @snprajwal
Thank you for the feedback!
I have modified my implementation so that all the features are handled by the Sourekit LSP rather than VS Code which was my earlier approach.
This is my updated proposal : Proposal Link

Please let me know if I’m missing any details and if any modifications are required.

Hi @padmashree06, this is looking very good! Some small points we’d like to share:

  • In section 4.5.3, you discuss having a registry for DocC’s metadata directives, but do not specify where this registry will live. It would be good to clarify in the proposal that this registry would be a part of DocC.
  • We would recommend dropping section 4.6 (design an icon for .tutorial files). This would most likely require a more involved review from designers or other Swift stakeholders.
  • The community bonding period will most likely be for a week or so, if you’d like to adjust the timeline in the proposal accordingly, feel free to do so. Just a general note!
1 Like

Given the size and scope of this proposal, this would qualify as a large project. Feel free to size it accordingly when submitting the proposal on the GSoC website.

1 Like

@snprajwal @matthewbastien

Thank you for the feedback! I will update the proposal and scope the project as large during submission.