Here’s a Christmas present for those of you who prefer (or have to) develop Swift packages outside of Xcode - today we’re releasing the initial version of the VSCode Swift extension
You can find the initial 0.1.0 release on the Visual Studio Marketplace here.
The extension aims to provide a first-class experience for developing Swift packages in VSCode. It’s being guided by the SSWG but a huge shoutout goes to @svanimpe and @adam-fowler who have done all of the work to get it ready for an initial release! One of the goals for 2021 for the SSWG was to improve the tooling for Swift on the server and this fills an important part of that.
The highlights of the extension include:
- Automatic task creation
- Package dependency view
- Code completion
- Jump to definition, peek definition, find all references, symbol search
- Error annotations and apply suggestions from errors
- Automatic generation of launch configurations for debugging with CoreLLDB
I’ve been using it for a couple of weeks now to work on some Vapor projects and it’s been great.
It would be remiss not to mention the extensions that have inspired this work, especially the Maintained Swift Development Environment. It would have been awesome to integrate them but proved too difficult in the end with differing aims.
Please note that this is a 0.1.0 release so it is not feature complete and there will be bugs that need to be fixed. We hope that lots of people will try it out and get involved!
Over the next couple of weeks I’ll be working to integrate the VSCode test explorer to provide a similar test experience to Xcode (run individual tests or classes of tests from the UI) and I’m sure there will be many feature requests and bugs to fix! Please create an issue on the GitHub repo or post on the
#vscode-swift channel on Slack.
Any contributions would be amazing and this is a community driven extension so if you want to get involved, please do!