This key defines configuration options for literal parser configurations.
The value is an object that can contain literal and format properties. These options control what literal string value must be matched.
Appears in#
└── Snippet
└── params
└── *
└── Literal Parser Configuration
└── optionsType#
Object Required
Properties#
This key defines formatting options for literal parser configurations.
The value is an object that can contain string_boundary properties. These options control how the literal value is parsed and matched.
Appears in: Literal Parser Configuration options.
Show examplesHide examples
In this example, we have configured literal parser format options with string boundaries.
_snippets:
example:
snippet: <<example [[literal_param]]>>
params:
literal_param:
parser: literal
options:
literal: specific-value
format:
string_boundary:
- '"'{
"_snippets": {
"example": {
"snippet": "<<example [[literal_param]]>>",
"params": {
"literal_param": {
"parser": "literal",
"options": {
"literal": "specific-value",
"format": {
"string_boundary": [
"\""
]
}
}
}
}
}
}
}This key defines the literal string value that must be matched for literal parser configurations.
The value is a string that specifies the exact text that must appear in the snippet for the parameter to match.
Appears in: Literal Parser Configuration options.
Show examplesHide examples
In this example, we have configured a literal value that must be matched.
_snippets:
example:
snippet: <<example [[literal_param]]>>
params:
literal_param:
parser: literal
options:
literal: specific-value{
"_snippets": {
"example": {
"snippet": "<<example [[literal_param]]>>",
"params": {
"literal_param": {
"parser": "literal",
"options": {
"literal": "specific-value"
}
}
}
}
}
}Examples#
In this example, we have configured literal parser options with a literal value.
_snippets:
example:
snippet: <<example [[literal_param]]>>
params:
literal_param:
parser: literal
options:
literal: specific-value{
"_snippets": {
"example": {
"snippet": "<<example [[literal_param]]>>",
"params": {
"literal_param": {
"parser": "literal",
"options": {
"literal": "specific-value"
}
}
}
}
}
}