Week of November 10th 2025

Happy Monday!

Another week has come so here is another update for all you users and fans of the Swift Extension of VS Code!

:white_check_mark: What we addressed?

  • Made some improvements to the markdown that is visible from the extension editor in VS Code

  • Had a community contribution from @fpseverino to add GYB syntax highlighting. Thanks!

:beetle: New Issues

  • Swift extension activation is held up if the project’s launch configuration needs to be updated (#1912)

:date: What’s coming up?

  • Some minor issues in the 2.12 release have been fixed and should be released this week

  • Next Monday the 17th of November at 1PM EST we will be holding our first Swift extension office hours. More information to follow!

Anything else you would like to hear about? Let us know in the comments below. As always feel free to raise new issues or feature requests (Issues) and we encourage opening any Pull Request you want to see make it into the extension. Have a great week everyone!

8 Likes

It would be nice to also include syntax highlighting for Sourcery stencils. The official repository seems abandoned and doesn't even include rules for Swift stencils: GitHub - stencilproject/vscode-stencil: Stencil for Visual Studio Code.

This is the version I use: GitHub - Cyberbeni/vscode-stencil: Stencil for Visual Studio Code.

With a fix based on the comment from here: Pipe character breaks the highlighting · Issue #4 · stencilproject/vscode-stencil · GitHub

That VS Code extension is something I made many many years ago, back when we still had Kitura, which used Stencil for HTML templating. I contributed that extension to the Stencil organisation, but I don’t think it has been maintained ever since.

On the server-side, I suspect most people now use either Leaf or Mustache.

Stencil is also used for Swift templates with Sourcery. One example I used multiple times is automatically creating a Codable enum from all types that conform to a specified protocol, basically allowing me to decode the any MyProtocol type.

@Cyberbeni thanks for reaching out and bringing up this topic :slightly_smiling_face:

The goal of the extension is to enable generic Swift package development. As of now there is no plan to add in support for individual libraries like Sourcery. However, we have talked with other developers about exposing different APIs of the Swift extension so dependent extensions downstream can make use of the APIs. So if these existing extensions or new that ones can benefit from some of the logic in the Swift extension, please reach out and we can talk!

We're already using the Swift VSCode Extension's APIs for various things :slight_smile:

2 Likes

Isn't gyb also a completely separate tool? gyb · PyPI

GYB is the template developed and built as part of the swift toolchain (see this thread) and used to produce Swift code. A lot of developers of the Swift toolchain itself work with GYB, so it helps a lot with the toolchain's development. Looks like a 3rd party maybe published that PIP module

That didn't answer my question, so let me rephrase it: If I follow these steps to install Swift, will I have gyb installed? Or do I have to go get it separately, like from the swiftlang/swift GH repo?

@Cyberbeni no you would not have it installed. GYB is used to develop the toolchain itself and certain packages like swift-crypto. It is run as a script in those specific projects, so nothing you can “install” like a command line tool