Skip to content

Commit

Permalink
revise: change indentation in snippets to tabs (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod authored Jul 30, 2024
1 parent b63eccc commit b283adc
Showing 1 changed file with 77 additions and 96 deletions.
173 changes: 77 additions & 96 deletions snippets/wdl.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"prefix": "struct",
"body": [
"struct ${TM_SELECTED_TEXT:${1:MyStruct}} {",
" ${2|Array,Boolean,Directory,File,Float,Int,Map,Object,Pair,String|} ${3:name}",
"\t${2|Array,Boolean,Directory,File,Float,Int,Map,Object,Pair,String|} ${3:name}",
"}",
],
"description": "Create a new struct",
Expand All @@ -13,39 +13,32 @@
"body": [
"task ${TM_SELECTED_TEXT:${1:my_task}} {",
"",
" command <<<",
" echo \"Hello, world!\"",
" >>>",
"\tcommand <<<",
"\t\techo \"Hello, world!\"",
"\t>>>",
"",
" requirements {",
" container: \"ubuntu:latest\"",
" }",
"\trequirements {",
"\t\tcontainer: \"ubuntu:latest\"",
"\t}",
"}",
],
"description": "Create a new task",
},
"Create a new `meta` section": {
"prefix": "meta",
"body": [
"meta {",
" description: \"${1: This is a description.}\"",
"}"
],
"body": ["meta {", "\tdescription: \"${1: This is a description.}\"", "}"],
"description": "Create a new `meta` section",
},
"Create a new `parameter_meta` section": {
"prefix": "parameter_meta",
"body": [
"parameter_meta {",
"}"
],
"body": ["parameter_meta {", "}"],
"description": "Create a new `parameter_meta` section",
},
"Create a new `input` section": {
"prefix": "input",
"body": [
"input {",
" ${1|Array,Boolean,Directory,File,Float,Int,Map,Object,Pair,String|} ${2:name}",
"\t${1|Array,Boolean,Directory,File,Float,Int,Map,Object,Pair,String|} ${2:name}",
"}",
],
"description": "Create a new `input` section",
Expand All @@ -54,7 +47,7 @@
"prefix": "output",
"body": [
"output {",
" ${1|Array,Boolean,Directory,File,Float,Int,Map,Object,Pair,String|} ${2:name} = $0",
"\t${1|Array,Boolean,Directory,File,Float,Int,Map,Object,Pair,String|} ${2:name} = $0",
"}",
],
"description": "Create a new `output` section",
Expand All @@ -63,14 +56,14 @@
"prefix": "requirements",
"body": [
"requirements {",
" container: ${1:\"*\"}",
" cpu: ${2:1}",
" memory: ${3:\"2 GiB\"}",
" gpu: ${4:false}",
" fpga: ${5:false}",
" disks: ${6:\"1 GiB\"}",
" max_retries: ${7:0}",
" return_codes: ${8:0}",
"\tcontainer: ${1:\"*\"}",
"\tcpu: ${2:1}",
"\tmemory: ${3:\"2 GiB\"}",
"\tgpu: ${4:false}",
"\tfpga: ${5:false}",
"\tdisks: ${6:\"1 GiB\"}",
"\tmax_retries: ${7:0}",
"\treturn_codes: ${8:0}",
"}",
],
"description": "Create a new `requirements` section",
Expand All @@ -79,14 +72,14 @@
"prefix": "runtime",
"body": [
"runtime {",
" container: ${1:\"*\"}",
" cpu: ${2:1}",
" memory: ${3:\"2 GiB\"}",
" gpu: ${4:false}",
" fpga: ${5:false}",
" disks: ${6:\"1 GiB\"}",
" max_retries: ${7:0}",
" return_codes: ${8:0}",
"\tcontainer: ${1:\"*\"}",
"\tcpu: ${2:1}",
"\tmemory: ${3:\"2 GiB\"}",
"\tgpu: ${4:false}",
"\tfpga: ${5:false}",
"\tdisks: ${6:\"1 GiB\"}",
"\tmax_retries: ${7:0}",
"\treturn_codes: ${8:0}",
"}",
],
"description": "Create a new `runtime` section",
Expand All @@ -95,15 +88,15 @@
"prefix": "hints",
"body": [
"hints {",
" max_cpu: ${1:32}",
" max_memory: ${2:\"32 GiB\"}",
" disks: ${3:\"500 GiB\"}",
" gpu: ${4:0}",
" fpga: ${5:0}",
" short_task: ${6:false}",
" localization_optional: ${7:false}",
" # inputs: TODO (e.g., `input { name: hints { min_length: 3 } }`)",
" # outputs: TODO (e.g., `output { name: hints { max_length: 5 } }`)",
"\tmax_cpu: ${1:32}",
"\tmax_memory: ${2:\"32 GiB\"}",
"\tdisks: ${3:\"500 GiB\"}",
"\tgpu: ${4:0}",
"\tfpga: ${5:0}",
"\tshort_task: ${6:false}",
"\tlocalization_optional: ${7:false}",
"\t# inputs: TODO (e.g., `input { name: hints { min_length: 3 } }`)",
"\t# outputs: TODO (e.g., `output { name: hints { max_length: 5 } }`)",
"}",
],
"description": "Create a new `hints` section",
Expand All @@ -112,73 +105,63 @@
"prefix": "complete-task",
"body": [
"task ${TM_SELECTED_TEXT:${1:my_task}} {",
" meta {",
" description: \"${2:This task greets the name passed to the input.}\"",
" }",
"\tmeta {",
"\t\tdescription: \"${2:This task greets the name passed to the input.}\"",
"\t}",
"",
" parameter_meta {",
" name: \"${3:The name to say 'hello' to.}\"",
" }",
"\tparameter_meta {",
"\t\tname: \"${3:The name to say 'hello' to.}\"",
"\t}",
"",
" input {",
" String name",
" }",
"\tinput {",
"\t\tString name",
"\t}",
"",
" command <<<",
" echo \"Hello, \\${name}\"",
" >>>",
"\tcommand <<<",
"\t\techo \"Hello, \\${name}\"",
"\t>>>",
"",
" output {}",
"\toutput {}",
"",
" requirements {",
" container: \"*\"",
" cpu: 1",
" memory: \"2 GiB\"",
" gpu: false",
" fpga: false",
" disks: \"1 GiB\"",
" max_retries: 0",
" return_codes: 0",
" }",
"\trequirements {",
"\t\tcontainer: \"*\"",
"\t\tcpu: 1",
"\t\tmemory: \"2 GiB\"",
"\t\tgpu: false",
"\t\tfpga: false",
"\t\tdisks: \"1 GiB\"",
"\t\tmax_retries: 0",
"\t\treturn_codes: 0",
"\t}",
"",
" hints {",
" max_cpu: 32",
" max_memory: \"32 GiB\"",
" disks: \"500 GiB\"",
" gpu: 0",
" fpga: 0",
" short_task: false",
" localization_optional: false",
" # inputs: TODO (e.g., `input { name: hints { min_length: 3 } }`)",
" # outputs: TODO (e.g., `output { name: hints { max_length: 5 } }`)",
" }",
"\thints {",
"\t\tmax_cpu: 32",
"\t\tmax_memory: \"32 GiB\"",
"\t\tdisks: \"500 GiB\"",
"\t\tgpu: 0",
"\t\tfpga: 0",
"\t\tshort_task: false",
"\t\tlocalization_optional: false",
"\t\t# inputs: TODO (e.g., `input { name: hints { min_length: 3 } }`)",
"\t\t# outputs: TODO (e.g., `output { name: hints { max_length: 5 } }`)",
"\t}",
"}",
],
"description": "Create a new complete task",
},
"Create a new `call` statement": {
"prefix": "call",
"body": [
"call ${0:a_task} {}"
],
"body": ["call ${0:a_task} {}"],
"description": "Create a new `call` statement",
},
"Create a new `if` statement": {
"prefix": "if",
"body": [
"if (${1:foo}) {",
" $0",
"}"
],
"body": ["if (${1:foo}) {", "\t$0", "}"],
"description": "Create a new `if` statement",
},
"Create a new `scatter` statement": {
"prefix": "scatter",
"body": [
"scatter (${1:foo} in ${2:foos}) {",
" $0",
"}"
],
"body": ["scatter (${1:foo} in ${2:foos}) {", "\t$0", "}"],
"description": "Create a new `scatter` statement",
},
"Create a new workflow": {
Expand All @@ -187,25 +170,23 @@
"workflow ${TM_SELECTED_TEXT:${1:my_workflow}} {",
"",
"inputs {",
" $1",
"\t$1",
"}",
"",
"call ${2:a_task} {",
" $3",
"\t$3",
"}",
"",
"",
"outputs {",
" $4",
"\t$4",
"}",
],
"description": "Create a new workflow",
},
"Create a new except comment": {
"prefix": "#@",
"body": [
"#@ except: $0"
],
"body": ["#@ except: $0"],
"description": "Create a new except comment",
},
}

0 comments on commit b283adc

Please sign in to comment.