Skip to content

[Feature Request] Add multiline description support in user snippets #66036

@zombie110year

Description

@zombie110year

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"
},

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitygood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiessnippets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions