TemplatesLanguageComponentConstructorParams
Parameters for the TemplatesLanguageComponent constructor.
Import:
import type { TemplatesLanguageComponentConstructorParams } from 'obsidian-dev-utils/obsidian/components/templates-language-component';Signature:
export interface TemplatesLanguageComponentConstructorParamsProperties
| Property | Type | Description |
|---|---|---|
| extraGrammar? | Grammar | undefined | Extra top-level entries merged into the built grammar, for a dialect whose templates carry syntax beyond the placeholders themselves — a path separator, say. Omit when there is none. |
| formatSource? | TemplatesLanguageComponentFormatSource | undefined | The format half of a {{token:format}} placeholder.Defaults to a scalar word, which is core's own shape. |
| language | string | The language to register the grammar as, e.g. my-plugin-template. |
| tokenPattern? | RegExp | undefined | The characters a token name may contain, anchored at the start of the placeholder body. Defaults to word characters. A dialect whose token names carry more — a comma-separated argument list, say — widens it here. |