title: Does VSCode snippet syntax allow optional parameters to a command
body: <p>I recently started using a 3rd party extension for language supporting robot programming (<a href="https://github.com/RoboDK" rel="nofollow noreferrer">RoboDK</a>). The extension is pretty good but doesn't include many of the commands I would like to use and doesn't correctly (at least to me) handle optional arguments to commands. I'd like to 'extend' the extension to support additional commands (and potentially provide this feedback to the developer).</p>
  <p>I'm specifically using ABB's RAPID robot language.</p>
  <p>Example:</p>
  <pre><code>MoveL robtarget, speeddata, zonedata, tooldata \WObj:=WObj0;
  </code></pre>
  <p>For MoveL, <em>var1</em> thru <em>var4</em> are required but <em>\WObj:=WObj0</em> is optional. The '<em>\WObj0:=</em>' part of the string is a constant (if supplying the option) and <em>WObj0</em> would be a variable of the expected type for <em>MoveL</em> (a work object, in this case).</p>
  <p>Is there a way to edit the snippets json to <em><strong>not</strong></em> enter the optional part unless I start typing a backslash followed by text? I also would like to keep the optional part in the snippet as a reference so I don't have to remember every optional argument as some commands have many options.</p>
  <p>Here's an excerpt from the snippet.abb.json file:</p>
  <pre><code>&quot;movel&quot;: {
      &quot;prefix&quot;: &quot;movel&quot;,
      &quot;body&quot;: [
          &quot;MoveL ${1:var_robtarget}, ${2:var_speeddata}, ${3:var_zonedata}, ${4:pers_tooldata} \\WObj:=WObj0;&quot;
      ],
      &quot;description&quot;: &quot;Linear motion&quot;
  },
  </code></pre>
  <p>Which results in the code with var_robtarget, var_speeddata, var_zonedata &amp; pers_tooldata all highlighted and the remainder is plain text:</p>
  <pre><code>MoveL var_robtarget, var_speeddata, var_zonedata, pers_tooldata \WObj:=WObj0;
  </code></pre>
  <p><img src="https://i.stack.imgur.com/CNTtj.png" alt="Image from VS code editor" /></p>