I was doing my daily scan of Twitter the other day and came across this https://twitter.com/DinisCruz/status/1304389504661434369
One of the commenters questioned how it was implemented, and there were a few follow up comments. Below are my steps for getting started
- Install Chocolatey (if not already installed) Open a command prompt, in adminstrator mode Type:
@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1′))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”
2. Install PlantUML
choco install plantuml
3. Install VS-Code
choco install vscode
4. Download the file from https://github.com/RicardoNiepel/C4-PlantUML/blob/master/.vscode/C4.code-snippets and save it to the folder %APPDATA%\Code\User\Snippets
This will allow you to use C4 snippets from any project.
If you only want to use the snippets from a single project, store the file in a .vscode folder in your project
5. Add the PlantUML extension (still at the command line)
code –install-extension jebbs.plantuml
6. Open VS-Code
7. Create a sample puml file
8. Click Alt-D to open the preview
I hope this helps someone get started. This was my first real foray into VS-Code. It won’t be my last.