Skip to content

Instantly share code, notes, and snippets.

@fuhrmanator
Last active June 15, 2021 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuhrmanator/793ea86cd3b3b0e9f655b11643de3910 to your computer and use it in GitHub Desktop.
Save fuhrmanator/793ea86cd3b3b0e9f655b11643de3910 to your computer and use it in GitHub Desktop.
PlantUML snippets in VSCode
{
// In VSCode, go to: File > Preferences > User Snippets
//
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Domain model association": {
"scope": "plantuml",
"prefix": "domain>association",
"body": "${1:ClassA} \"${2:0..1}\" ${3|*,o|}-[${4:color},${5|bold,dashed,dotted|}]-${6|*,o|} \"${7:0..1}\" ${8:ClassB} : ${9:Verb}",
"description": "Adds an association with lots of options."
},
"Domain model init": {
"scope": "plantuml",
"prefix": "domain>setup",
"body": ["skinparam style strictuml", "hide empty members"],
"description": "Adds an association with lots of options."
},
"Strict uml": {
"scope": "plantuml",
"prefix": "config>strict",
"body": ["skinparam style strictuml"],
"description": "Adds option for strict uml (no class icons, no footers in sequence diagrams, etc.)"
},
"Transparent background": {
"scope": "plantuml",
"prefix": "config>transparent",
"body": ["skinparam BackgroundColor transparent"],
"description": "Adds option for transparent background"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment