Thanks to Visual Studio Code Remote - Containers extension, now it's easy to write a code using VSCode inside a container. Regarding Swift, the sourcekit-lsp allows us to get more power on editor window however it requires manual steps to install the extension so I wrote a specific Dockerfile to do everything automatically. Thus we can start writing Swift as soon as you open this repo using Remote-Container
.
- Clone
- Open the repository in VSCode Dev Container
- Open the terminal (to run .bashrc to active sourcekit-lsp extension)
- Enjoy coding!
- Auto complete (by sourcekit-lsp)
- Format (by swift-format and
"editor.formatOnSave"
) - You can build by
build
task, and test bytest
task (by .vscode/tasks.json)