- Description:
This key defines styling options for snippet output formatting.
The value is an object that can contain
output,inline, andblockproperties. These options control how snippet content is parsed and formatted to produce cleaner source code.- Appears in:
└── Snippet └── params └── * ├── Content Parser Configuration │ └── options │ └── Snippet Style ├── Key Value List Parser Configuration │ └── options │ └── Snippet Style ├── Repeating Parser Configuration │ └── options │ └── Snippet Style └── Wrapper Parser Configuration └── options └── Snippet Style- Type:
Object- Properties:
This key defines block-level formatting options for snippet output.
The value is an object that can contain
leading,trailing, andindentproperties. These options control whitespace and indentation for multi-line snippet content.Show examplesHide examples
In this example, we have configured block formatting with leading, trailing, and indent options.
Copied to clipboard_snippets: highlight: snippet: <<highlight>> [[content]] <</highlight>> params: content: parser: content options: style: block: leading: \n trailing: \n indent: ' '{ "_snippets": { "highlight": { "snippet": "<<highlight>> [[content]] <</highlight>>", "params": { "content": { "parser": "content", "options": { "style": { "block": { "leading": "\\n", "trailing": "\\n", "indent": " " } } } } } } } }This key defines inline formatting options for snippet output.
The value is an object that can contain
leadingandtrailingproperties. These options control whitespace for single-line snippet content.Show examplesHide examples
In this example, we have configured inline formatting with leading and trailing spaces.
Copied to clipboard_snippets: highlight: snippet: <<highlight>> [[content]] <</highlight>> params: content: parser: content options: style: inline: leading: ' ' trailing: ' '{ "_snippets": { "highlight": { "snippet": "<<highlight>> [[content]] <</highlight>>", "params": { "content": { "parser": "content", "options": { "style": { "inline": { "leading": " ", "trailing": " " } } } } } } } }This key defines the output format style for snippet content.
The value can be
legacy,inline, orblock. This controls how snippet content is formatted when output to source code.Allowed values:
legacyinlineblockShow examplesHide examples
In this example, we have configured snippet output style to use block formatting.
Copied to clipboard_snippets: highlight: snippet: <<highlight>> [[content]] <</highlight>> params: content: parser: content options: style: output: block{ "_snippets": { "highlight": { "snippet": "<<highlight>> [[content]] <</highlight>>", "params": { "content": { "parser": "content", "options": { "style": { "output": "block" } } } } } } }- Examples:
In this example, we have configured snippet style with inline and block formatting options.
Copied to clipboard_snippets: highlight: snippet: <<highlight>> [[content]] <</highlight>> params: content: parser: content options: style: inline: leading: ' ' trailing: ' ' block: leading: \n trailing: \n indent: ' '{ "_snippets": { "highlight": { "snippet": "<<highlight>> [[content]] <</highlight>>", "params": { "content": { "parser": "content", "options": { "style": { "inline": { "leading": " ", "trailing": " " }, "block": { "leading": "\\n", "trailing": "\\n", "indent": " " } } } } } } } }