Vscode: [Feature Request] Add multiline description support in user snippets

Created on 4 Jan 2019  ·  3Comments  ·  Source: microsoft/vscode

While creating a user snippet, the rule must be like this:

"example": {
    "prefix": "example",
    "body": [
        "line 1",
        "line 2"
    ],
    "description": "A single line description"
}

If I want to show a lot of description, I must write a huge string which includes many escape characters like this:

"toctree": {
    "prefix": ".. toctree::",
    "body": [
        ".. toctree::",
        "$0"
    ],
    "description": "A toctree item, have these options:\n\t:maxdepth: para\n\t:caption: para
\n\t:numbered:\n\t:titlesonly:\n\t:glob:\n\t:reversed:\n\t:hidden:\n\t:includehidden:",
    "scope": "text.restructuredtext"
},

It maybe a good idea that description option receive a list value, like the body:

"toctree": {
    "prefix": ".. toctree::",
    "body": [
        ".. toctree::",
        "$0"
    ],
    "description": [
        "A toctree item, have these options:",
        ":maxdepth: para",
        ":caption: para",
        ":numbered:",
        ":titlesonly:",
        ":glob:",
        ":reversed:",
        ":hidden:",
        ":includehidden:"
    ],
    "scope": "text.restructuredtext"
},
feature-request good first issue help wanted snippets

All 3 comments

The Version infomations:

  • Code Version: 1.30.1 (user setup)
  • Commit: dea8705087adb1b5e5ae1d9123278e178656186a
  • Date: 2018-12-18T18:12:07.165Z
  • Electron: 2.0.12
  • Chrome: 61.0.3163.100
  • Node.js: 8.9.3
  • V8: 6.1.534.41
  • OS: Windows_NT x64 10.0.17763

@jrieken Can you guide me on resolving this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vsccarl picture vsccarl  ·  3Comments

v-pavanp picture v-pavanp  ·  3Comments

borekb picture borekb  ·  3Comments

omidgolparvar picture omidgolparvar  ·  3Comments

curtw picture curtw  ·  3Comments