{"id":15408927,"url":"https://github.com/sec-ant/prettier-plugin-embed","last_synced_at":"2025-08-20T03:31:21.525Z","repository":{"id":197806318,"uuid":"696553790","full_name":"Sec-ant/prettier-plugin-embed","owner":"Sec-ant","description":"A configurable Prettier plugin to format embedded languages in JS/TS Files.","archived":false,"fork":false,"pushed_at":"2024-04-08T03:37:59.000Z","size":1228,"stargazers_count":46,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-08T04:34:30.953Z","etag":null,"topics":["embed","embedded","embedded-language","format","plugin","prettier","prettier-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/prettier-plugin-embed/v/latest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sec-ant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-26T01:29:37.000Z","updated_at":"2024-04-15T05:39:15.232Z","dependencies_parsed_at":"2023-10-12T13:06:01.097Z","dependency_job_id":"2d23165c-31f5-4d76-895c-f8b857bc8386","html_url":"https://github.com/Sec-ant/prettier-plugin-embed","commit_stats":null,"previous_names":["sec-ant/prettier-plugin-embed"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fprettier-plugin-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fprettier-plugin-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fprettier-plugin-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fprettier-plugin-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sec-ant","download_url":"https://codeload.github.com/Sec-ant/prettier-plugin-embed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230038804,"owners_count":18163308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embed","embedded","embedded-language","format","plugin","prettier","prettier-plugin"],"created_at":"2024-10-01T16:36:01.292Z","updated_at":"2025-08-20T03:31:21.516Z","avatar_url":"https://github.com/Sec-ant.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n![prettier-plugin-embed-wide-logo](./asset/prettier-plugin-embed-wide-light.svg#gh-light-mode-only)\n![prettier-plugin-embed-wide-logo](./asset/prettier-plugin-embed-wide-dark.svg#gh-dark-mode-only)\n\n# Prettier Plugin Embed\n\n[![npm version](https://img.shields.io/npm/v/prettier-plugin-embed?cacheSeconds=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![npm downloads](https://img.shields.io/npm/dm/prettier-plugin-embed?cacheSeconds=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![npm license](https://img.shields.io/npm/l/prettier-plugin-embed?cacheSeconds=300)](https://www.npmjs.com/package/prettier-plugin-embed/v/latest) [![All Contributors](https://img.shields.io/github/all-contributors/Sec-ant/prettier-plugin-embed?color=56b3b4)](#contributors)\n\n[![github last commit](https://img.shields.io/github/last-commit/Sec-ant/prettier-plugin-embed?cacheSeconds=300)](https://github.com/Sec-ant/prettier-plugin-embed) [![bundlephobia minzipped](https://img.shields.io/bundlephobia/minzip/prettier-plugin-embed?cacheSeconds=300)](https://bundlephobia.com/package/prettier-plugin-embed@latest) [![](https://img.shields.io/jsdelivr/npm/hm/prettier-plugin-embed?cacheSeconds=300\u0026color=ff5627)](https://www.jsdelivr.com/package/npm/prettier-plugin-embed)\n\nA configurable [Prettier](https://prettier.io/) [plugin](https://prettier.io/docs/en/plugins.html) to format [embedded languages](https://prettier.io/docs/en/options.html#embedded-language-formatting) in JS/TS Files.\n\n```bash\nnpm i -D prettier-plugin-embed\n```\n\n\u003c/div\u003e\n\n## Introduction\n\n### What?\n\nThis Prettier plugin (namely [`prettier-plugin-embed`](https://github.com/Sec-ant/prettier-plugin-embed)) provides a configurable solution for formatting embedded languages in the form of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals) within JavaScript or TypeScript files.\n\n### Why?\n\nPrettier has introduced an option for formatting embedded languages, named [`embedded-language-formatting`](https://prettier.io/docs/en/options.html#embedded-language-formatting). However, this option only offers two modes: `auto` and `off`. This limits its functionality, as it does not permit individual formatting adjustments for specific languages. Additionally, it lacks support for customizing which languages require formatting, as well as specifying block comments or tags for embedded language identification. These constraints hinder the feature's overall usability. For in-depth discussions on this matter, see the GitHub issues: [prettier/prettier#4424](https://github.com/prettier/prettier/issues/4424) and [prettier/prettier#5588](https://github.com/prettier/prettier/issues/5588).\n\n### How?\n\nBy leveraging Prettier's plugin system, this plugin overrides the default [`embed`](https://prettier.io/docs/en/plugins#optional-embed) function of the `estree` printer, so varieties of new languages can be hooked in through this function. Check [this file](./src/printers.ts) to get an idea of how this is accomplished.\n\n## Features\n\n- **Support for Additional Languages:** Extend the embedded language formatting capability to include languages such as XML, SQL, PHP, and more.\n\n- **Dual Identification Modes:** Identify embedded languages by block comments `` /* comment */ `...` `` or tags `` tag`...` `` preceding the template literals.\n\n- **Customizable Language Comments or Tags:** Customize the comments or tags used for identifying the embedded languages.\n\n- **Formatting Opt-out Mechanism:** Offer the capability to deactivate formatting for certain comments or tags, including the built-in ones (`html`, `css`...) supported by the `embedded-language-formatting` option.\n\n- **Configurable Formatting Style:** Provide additional options to tailor the formatting style for embedded languages.\n\n- **Strongly Typed API:** Benefit from comprehensive type support for configuring this plugin's options.\n\n- **Easy Integration:** Integrate with the existing Prettier setup seamlessly, requiring minimal configuration to get started.\n\n## Installation\n\n```bash\nnpm i -D prettier-plugin-embed\n```\n\n## Usage\n\n### Getting Started\n\nThis is a Prettier plugin, which follows the [standard usage pattern](https://prettier.io/docs/en/plugins.html#using-plugins) of many other Prettier plugins:\n\n#### [CLI](https://prettier.io/docs/en/cli):\n\nVia `--plugin`:\n\n```bash\nprettier --write main.ts --plugin=prettier-plugin-embed\n```\n\n#### [API](https://prettier.io/docs/en/api):\n\nVia the `plugins` options:\n\n```ts\nawait prettier.format(code, {\n  filepath: \"main.ts\",\n  plugins: [\"prettier-plugin-embed\"],\n});\n```\n\n#### [Configuration File](https://prettier.io/docs/en/configuration):\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-embed\"]\n}\n```\n\n### Quick Start Config Examples\n\nHere're some [quick start config examples](./ConfigExamples.md) to use this plugin for various embedded languages. Check beblow for a detailed explanation of all the available options.\n\n### An Overview of the Philosophy\n\nTo use this plugin, [`embedded-language-formatting`](https://prettier.io/docs/en/options.html#embedded-language-formatting) option must be set to `auto` (which is the default setting as of now), because this option serves as the main switch for activating embedded language formatting.\n\nThis plugin does not aim to implement parsers or printers to support every newly added embedded language. Rather, it aims to leverage existing [Prettier plugins](https://prettier.io/docs/en/plugins.html#official-plugins) for those languages, and only adds a thin layer of formatting support when they are embedded in template literals.\n\nTherefore, to enable formatting for a specific embedded language, the corresponding Prettier plugin for that language must also be loaded. For example, if you wish to format embedded XML language, you will need to load both this plugin and [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml). To find out which other plugins are required when using this plugin, please refer to the [Language-Specific Options](#language-specific-options) section below.\n\nEmbedded languages to be formatted are required to be enclosed in the template literals, and are identified by the preceding [block comments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#block_comments) `` /* comment */ `...` `` or [tags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) `` tag`...` ``. This plugin comes pre-configured with a built-in set of comments and tags for identifying various embedded languages. For instance, using comments like `/* xml */` or `/* svg */` or tags like `xml` or `svg` will trigger automatic formatting for the embedded XML language. You can specify an alternative list of comments or tags using the `embeddedXmlComments` option or the `embeddedXmlTags` option, respectively. The naming convention for these options follows the pattern of `embedded\u003cLanguage\u003eComments` and `embedded\u003cLanguage\u003eTags` for other languages as well. Further details on these options and how to configure them are also available in the [Language-Specific Options](#language-specific-options) section.\n\nTo exclude certain comments or tags from being identified, like the default ones supported by the [`embedded-language-formatting`](https://prettier.io/docs/en/options.html#embedded-language-formatting) option, add them to the list of the `embeddedNoopComments`/`embeddedNoopTags` options. Any matching comments or tags listed in these options will take precedence over other `embedded\u003cLanguage\u003eComments` and `embedded\u003cLanguage\u003eTags` options, effectively disabling their formatting.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Until this notice is removed, always specify comments or tags explicitly and do not rely on the built-in defaults, as they may be subject to change.\n\n### Language-Specific Options\n\nSupported embedded languages are:\n\n- [CSS](#css)\n- [ES (ECMAScript/JavaScript)](#es-ecmascriptjavascript)\n- [GLSL](#glsl)\n- [GraphQL](#graphql)\n- [HTML](#html)\n- [INI](#ini)\n- [Java](#java)\n- [JSON](#json)\n- [JSONata](#jsonata)\n- [LaTeX](#latex)\n- [Markdown](#markdown)\n- [NGINX](#nginx)\n- [Pegjs](#pegjs)\n- [PHP](#php)\n- [Prisma](#prisma)\n- [Properties](#properties)\n- [Pug](#pug)\n- [Ruby](#ruby)\n- [Sh (Shell)](#sh-shell)\n- [SQL](#sql)\n- [TOML](#TOML)\n- [TS (TypeScript)](#ts-typescript)\n- [XML](#xml)\n- [YAML](#yaml)\n\n\u003cdetails open\u003e\n\u003csummary\u003e\nClick Here to Toggle\n\u003c/summary\u003e\n\n#### NOOP\n\n##### `embeddedNoopComments`\n\n- **Type**: `string[]`\n- **Default**: [`[]`](./src/embedded/noop/options.ts)\n- **Description**: Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.\n\n##### `embeddedNoopTags`\n\n- **Type**: `string[]`\n- **Default**: [`[]`](./src/embedded/noop/options.ts)\n- **Description**: Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.\n\n##### ~~`embeddedNoopIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[]`](./src/embedded/noop/options.ts)\n- **Description**: Comment or tag identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.\n\nPlease use `embeddedNoopComments` or `embeddedNoopTags`.\n\n\u003c/details\u003e\n\nThis \"language\" doesn't require other plugins and can override the native embedded language formatting. It serves as a way to turn off embedded language formatting for the specified language comments or tags.\n\n#### CSS\n\n##### `embeddedCssComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"css\"]`](./src/embedded/css/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded CSS language.\n\n##### `embeddedCssTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"css\"]`](./src/embedded/css/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded CSS language.\n\n##### ~~`embeddedCssIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"css\"]`](./src/embedded/css/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded CSS language.\n\nPlease use `embeddedCssComments` or `embeddedCssTags`.\n\n\u003c/details\u003e\n\n##### `embeddedCssParser`\n\n- **Type**: [`\"css\" | \"less\" | \"scss\"`](./src/embedded/css/options.ts)\n- **Default**: [`\"scss\"`](./src/embedded/css/options.ts)\n- **Description**: The parser used to parse the embedded CSS language.\n\nFormatting embedded CSS language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nThis can override the native formatting bahavior for embedded CSS language. If you want to keep the native behavior, set `embeddedCssComments` or `embeddedCssTags` to `[]` or other values.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### ES (ECMAScript/JavaScript)\n\n##### `embeddedEsComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"js\", \"jsx\", \"es\", \"es6\", \"mjs\", \"cjs\", \"pac\", \"javascript\"]`](./src/embedded/es/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.\n\n##### `embeddedEsTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"js\", \"jsx\", \"es\", \"es6\", \"mjs\", \"cjs\", \"pac\", \"javascript\"]`](./src/embedded/es/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.\n\n##### ~~`embeddedEsIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"js\", \"jsx\", \"es\", \"es6\", \"mjs\", \"cjs\", \"pac\", \"javascript\"]`](./src/embedded/es/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.\n\nPlease use `embeddedEsComments` or `embeddedEsTags`.\n\n\u003c/details\u003e\n\n##### `embeddedEsParser`\n\n- **Type**: [`\"babel\" | \"babel-flow\" | \"acorn\" | \"espree\" | \"flow\" | \"meriyah\"`](./src/embedded/es/options.ts)\n- **Default**: [`\"babel\"`](./src/embedded/es/options.ts)\n- **Description**: The parser used to parse the embedded ECMASCript/JavaScript language.\n\nFormatting embedded ECMAScript/JavaScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### GLSL\n\n##### `embeddedGlslComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"glsl\", \"shader\"]`](./src/embedded/glsl/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.\n\n##### `embeddedGlslTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"glsl\", \"shader\"]`](./src/embedded/glsl/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.\n\n##### ~~`embeddedGlslIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"glsl\", \"shader\"]`](./src/embedded/glsl/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.\n\nPlease use `embeddedGlslComments` or `embeddedGlslTags`.\n\n\u003c/details\u003e\n\nFormatting embedded GLSL language requires the [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl) plugin to be loaded as well.\n\n#### GraphQL\n\n##### `embeddedGraphqlComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"graphql\", \"gql\"]`](./src/embedded/graphql/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded GraphQL language.\n\n##### `embeddedGraphqlTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"graphql\", \"gql\"]`](./src/embedded/graphql/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded GraphQL language.\n\n##### ~~`embeddedGraphqlIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"graphql\", \"gql\"]`](./src/embedded/graphql/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded GraphQL language.\n\nPlease use `embeddedGraphqlComments` or `embeddedGraphqlTags`.\n\n\u003c/details\u003e\n\nFormatting embedded GraphQL language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nThis can override the native formatting behavior for embedded GraphQL language. If you want to keep the native behavior, set `embeddedGraphqlComments` or `embeddedGraphqlTags` to `[]` or other values.\n\n#### HTML\n\n##### `embeddedHtmlComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"html\", \"xhtml\"]`](./src/embedded/html/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded HTML language.\n\n##### `embeddedHtmlTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"html\", \"xhtml\"]`](./src/embedded/html/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded HTML language.\n\n##### ~~`embeddedHtmlIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"html\", \"xhtml\"]`](./src/embedded/html/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded HTML language.\n\nPlease use `embeddedHtmlComments` or `embeddedHtmlTags`.\n\n\u003c/details\u003e\n\n##### `embeddedHtmlParser`\n\n- **Type**: [`\"html\" | \"vue\" | \"angular\" | \"lwc\"`](./src/embedded/html/options.ts)\n- **Default**: [`\"html\"`](./src/embedded/html/options.ts)\n- **Description**: The parser used to parse the embedded HTML language.\n\nFormatting embedded HTML language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nThis can override the native formatting behavior for embedded HTML language. If you want to keep the native behavior, set `embeddedHtmlComments` or `embeddedHtmlTags` to `[]` or other values.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### INI\n\n##### `embeddedIniComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"ini\", \"cfg\", \"pro\"]`](./src/embedded/ini/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.\n\n##### `embeddedIniTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"ini\", \"cfg\", \"pro\"]`](./src/embedded/ini/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.\n\n##### ~~`embeddedIniIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"ini\", \"cfg\", \"pro\"]`](./src/embedded/ini/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.\n\nPlease use `embeddedIniComments` or `embeddedIniTags`.\n\n\u003c/details\u003e\n\nFormatting embedded INI language requires the [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini) plugin to be loaded as well. And [options](https://github.com/kddnewton/prettier-plugin-ini#configuration) supported by `prettier-plugin-ini` can therefore be used to further control the formatting behavior.\n\n#### Java\n\n##### `embeddedJavaComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"java\"]`](./src/embedded/java/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.\n\n##### `embeddedJavaTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"java\"]`](./src/embedded/java/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.\n\n##### ~~`embeddedJavaIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"java\"]`](./src/embedded/java/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.\n\nPlease use `embeddedJavaComments` or `embeddedJavaTags`.\n\n\u003c/details\u003e\n\nFormatting embedded Java language requires the [`prettier-plugin-java`](https://github.com/jhipster/prettier-java/tree/main/packages/prettier-plugin-java) plugin to be loaded as well. And [options](https://github.com/jhipster/prettier-java/tree/main/packages/prettier-plugin-java#options) supported by `prettier-plugin-java` can therefore be used to further control the formatting behavior.\n\n#### JSON\n\n##### `embeddedJsonComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"json\", \"jsonl\"]`](./src/embedded/json/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded JSON language.\n\n##### `embeddedJsonTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"json\", \"jsonl\"]`](./src/embedded/json/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded JSON language.\n\n##### ~~`embeddedJsonIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"json\", \"jsonl\"]`](./src/embedded/json/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded JSON language.\n\nPlease use `embeddedJsonComments` or `embeddedJsonTags`.\n\n\u003c/details\u003e\n\n##### `embeddedJsonParser`\n\n- **Type**: [`\"json\" | \"json5\" | \"jsonc\" | \"json-stringify\"`](./src/embedded/json/options.ts)\n- **Default**: [`\"json\"`](./src/embedded/json/options.ts)\n- **Description**: The parser used to parse the embedded JSON language.\n\nFormatting embedded JSON language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### JSONata\n\n##### `embeddedJsonataComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"jsonata\"]`](./src/embedded/jsonata/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.\n\n##### `embeddedJsonataTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"jsonata\"]`](./src/embedded/jsonata/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.\n\n##### ~~`embeddedJsonataIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"jsonata\"]`](./src/embedded/jsonata/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.\n\nPlease use `embeddedJsonataComments` or `embeddedJsonataTags`.\n\n\u003c/details\u003e\n\nFormatting embedded JSONata language requires the [`@stedi/prettier-plugin-jsonata`](https://github.com/Stedi/prettier-plugin-jsonata) plugin to be loaded as well.\n\n#### LaTeX\n\n##### `embeddedLatexComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"latex\", \"tex\", \"aux\", \"cls\", \"bbl\", \"bib\", \"toc\", \"sty\"]`](./src/embedded/latex/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.\n\n##### `embeddedLatexTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"latex\", \"tex\", \"aux\", \"cls\", \"bbl\", \"bib\", \"toc\", \"sty\"]`](./src/embedded/latex/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.\n\n##### ~~`embeddedLatexIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"latex\", \"tex\", \"aux\", \"cls\", \"bbl\", \"bib\", \"toc\", \"sty\"]`](./src/embedded/latex/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.\n\nPlease use `embeddedLatexComments` or `embeddedLatexTags`.\n\n\u003c/details\u003e\n\nFormatting embedded LaTeX language requires the [`prettier-plugin-latex`](https://github.com/siefkenj/prettier-plugin-latex) plugin to be loaded as well.\n\n#### Markdown\n\n##### `embeddedMarkdownComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"md\", \"markdown\"]`](./src/embedded/markdown/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Markdown language.\n\n##### `embeddedMarkdownTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"md\", \"markdown\"]`](./src/embedded/markdown/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Markdown language.\n\n##### ~~`embeddedMarkdownIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"md\", \"markdown\"]`](./src/embedded/markdown/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Markdown language.\n\nPlease use `embeddedMarkdownComments` or `embeddedMarkdownTags`.\n\n\u003c/details\u003e\n\n##### `embeddedMarkdownParser`\n\n- **Type**: [`\"markdown\" | \"mdx\" | \"remark\"`](./src/embedded/markdown/options.ts)\n- **Default**: [`\"markdown\"`](./src/embedded/markdown/options.ts)\n- **Description**: The parser used to parse the embedded Markdown language.\n\nFormatting embedded Markdown language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nThis can override the native formatting for embedded Markdown language. If you want to keep the native behavior, set `embeddedMarkdownComments` or `embeddedMarkdownTags` to `[]` or other values.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\nThe `remark` parser is [an alias of the `markdown` parser](https://github.com/prettier/prettier/blob/ed23dacc9e655c3876971b30859497b17ff2cf9f/src/language-markdown/parser-markdown.js#L57).\n\n#### NGINX\n\n##### `embeddedNginxComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"nginx\"]`](./src/embedded/nginx/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.\n\n##### `embeddedNginxTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"nginx\"]`](./src/embedded/nginx/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.\n\n##### ~~`embeddedNginxIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"nginx\"]`](./src/embedded/nginx/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.\n\nPlease use `embeddedNginxComments` or `embeddedNginxTags`.\n\n\u003c/details\u003e\n\nFormatting embedded NGINX language requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx) plugin to be loaded as well. And [options](https://github.com/jxddk/prettier-plugin-nginx?tab=readme-ov-file#configuration) supported by `prettier-plugin-nginx` can therefore be used to further control the formatting behavior.\n\n#### Pegjs\n\n##### `embeddedPegjsComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"pegjs\", \"peggy\", \"peg\"]`](./src/embedded/pegjs/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.\n\n##### `embeddedPegjsTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"pegjs\", \"peggy\", \"peg\"]`](./src/embedded/pegjs/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.\n\n##### ~~`embeddedPegjsIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"pegjs\", \"peggy\", \"peg\"]`](./src/embedded/pegjs/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.\n\nPlease use `embeddedPegjsComments` or `embeddedPegjsTags`.\n\n\u003c/details\u003e\n\nFormatting embedded Pegjs language requires the [`prettier-plugin-pegjs`](https://github.com/siefkenj/prettier-plugin-pegjs) plugin to be loaded as well. And [options](https://github.com/siefkenj/prettier-plugin-pegjs?tab=readme-ov-file#options) supported by `prettier-plugin-pegjs` can therefore be used to further control the formatting behavior.\n\nNote that `prettier-plugin-pegjs` supports different parsers for the action blocks and they are specified by the [`actionParser` option](https://github.com/siefkenj/prettier-plugin-pegjs?tab=readme-ov-file#options). If you want to specify different action parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### PHP\n\n##### `embeddedPhpComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"php\", \"php5\"]`](./src/embedded/php/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.\n\n##### `embeddedPhpTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"php\", \"php5\"]`](./src/embedded/php/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.\n\n##### ~~`embeddedPhpIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"php\", \"php5\"]`](./src/embedded/php/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.\n\nPlease use `embeddedPhpComments` or `embeddedPhpTags`.\n\n\u003c/details\u003e\n\nFormatting embedded PHP language requires the [`@prettier/plugin-php`](https://github.com/prettier/plugin-php) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-php#configuration) supported by `@prettier/plugin-php` can therefore be used to further control the formatting behavior.\n\n#### Prisma\n\n##### `embeddedPrismaComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"prisma\"]`](./src/embedded/prisma/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.\n\n##### `embeddedPrismaTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"prisma\"]`](./src/embedded/prisma/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.\n\n##### ~~`embeddedPrismaIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"prisma\"]`](./src/embedded/prisma/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.\n\nPlease use `embeddedPrismaComments` or `embeddedPrismaTags`.\n\n\u003c/details\u003e\n\nFormatting embedded Prisma language requires the [`prettier-plugin-prisma`](https://github.com/avocadowastaken/prettier-plugin-prisma) plugin to be loaded as well.\n\n#### Properties\n\n##### `embeddedPropertiesComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"properties\"]`](./src/embedded/properties/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.\n\n##### `embeddedPropertiesTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"properties\"]`](./src/embedded/properties/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.\n\n##### ~~`embeddedPropertiesIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"properties\"]`](./src/embedded/properties/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.\n\nPlease use `embeddedPropertiesComments` or `embeddedPropertiesTags`.\n\n\u003c/details\u003e\n\nFormatting embedded Properties language requires the [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) plugin to be loaded as well. And [options](https://github.com/eemeli/prettier-plugin-properties#configuration) supported by `prettier-plugin-properties` can therefore be used to further control the formatting behavior.\n\n#### Pug\n\n##### `embeddedPugComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"pug\", \"jade\"]`](./src/embedded/pug/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.\n\n##### `embeddedPugTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"pug\", \"jade\"]`](./src/embedded/pug/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.\n\n##### ~~`embeddedPugIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"pug\", \"jade\"]`](./src/embedded/pug/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.\n\nPlease use `embeddedPugComments` or `embeddedPugTags`.\n\n\u003c/details\u003e\n\nFormatting embedded Pug language requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-pug?tab=readme-ov-file#configuration) supported by `@prettier/plugin-pug` can therefore be used to further control the formatting behavior.\n\n#### Ruby\n\n##### `embeddedRubyComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"ruby\"]`](./src/embedded/ruby/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.\n\n##### `embeddedRubyTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"ruby\"]`](./src/embedded/ruby/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.\n\n##### ~~`embeddedRubyIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"ruby\"]`](./src/embedded/ruby/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.\n\nPlease use `embeddedRubyComments` or `embeddedRubyTags`.\n\n\u003c/details\u003e\n\n##### `embeddedRubyParser`\n\n- **Type**: [`\"ruby\" | \"rbs\" | \"haml\"`](./src/embedded/ruby/options.ts)\n- **Default**: [`\"ruby\"`](./src/embedded/ruby/options.ts)\n- **Description**: The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.\n\nFormatting embedded Ruby language requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-ruby` can therefore be used to further control the formatting behavior.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### Sh (Shell)\n\n##### `embeddedShComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"sh\"]`](./src/embedded/sh/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.\n\n##### `embeddedShTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"sh\"]`](./src/embedded/sh/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.\n\n##### ~~`embeddedShIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"sh\"]`](./src/embedded/sh/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.\n\nPlease use `embeddedShComments` or `embeddedShTags`.\n\n\u003c/details\u003e\n\nFormatting embedded Shell language requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options) supported by `prettier-plugin-sh` can therefore be used to further control the formatting behavior.\n\nNote that `prettier-plugin-sh` supports different variants of shell syntaxes and they are specified by the [`variant` option](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options). If you want to specify different variants for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### SQL\n\n##### `embeddedSqlComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"sql\"]`](./src/embedded/sql/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.\n\n##### `embeddedSqlTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"sql\"]`](./src/embedded/sql/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.\n\n##### ~~`embeddedSqlIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"sql\"]`](./src/embedded/sql/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.\n\nPlease use `embeddedSqlComments` or `embeddedSqlTags`.\n\n\u003c/details\u003e\n\n##### `embeddedSqlPlugin`\n\n- **Type**: [`\"prettier-plugin-sql\" | \"prettier-plugin-sql-cst\"`](./src/embedded/sql/options.ts)\n- **Default**: [`\"prettier-plugin-sql\"`](./src/embedded/sql/options.ts)\n- **Description**: The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.\n\n##### `embeddedSqlParser`\n\n- **Type**: [`\"sqlite\" | \"bigquery\" | \"mysql\" | \"mariadb\" | \"postgresql\"` ](./src/embedded/sql/options.ts)\n- **Default**: [`\"sqlite\"`](./src/embedded/sql/options.ts)\n- **Description**: Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.\n\nFormatting embedded SQL language requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options) supported by `prettier-plugin-sql`, or [options](https://github.com/nene/prettier-plugin-sql-cst?tab=readme-ov-file#configuration) supported by `prettier-plugin-sql-cst` can therefore be used to further control the formatting behavior.\n\nNote that `prettier-plugin-sql` supports many different SQL dialects which are specified by the [`language`, `database` or `dialect` option](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options). And `prettier-plugin-sql-cst` also supports various parsers as shown above. If you want to specify different dialects or parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### TOML\n\n##### `embeddedTomlComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"toml\"]`](./src/embedded/toml/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.\n\n##### `embeddedTomlTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"toml\"]`](./src/embedded/toml/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.\n\n##### ~~`embeddedTomlIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"toml\"]`](./src/embedded/toml/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.\n\nPlease use `embeddedTomlComments` or `embeddedTomlTags`.\n\n\u003c/details\u003e\n\nFormatting embedded TOML language requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/blob/master/packages/toml/src/options.ts) supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior.\n\n#### TS (TypeScript)\n\n##### `embeddedTsComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"ts\", \"tsx\", \"cts\", \"mts\", \"typescript\"]`](./src/embedded/ts/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded TypeScript language.\n\n##### `embeddedTsTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"ts\", \"tsx\", \"cts\", \"mts\", \"typescript\"]`](./src/embedded/ts/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded TypeScript language.\n\n##### ~~`embeddedTsIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"ts\", \"tsx\", \"cts\", \"mts\", \"typescript\"]`](./src/embedded/ts/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded TypeScript language.\n\nPlease use `embeddedTsComments` or `embeddedTsTags`.\n\n\u003c/details\u003e\n\n##### `embeddedTsParser`\n\n- **Type**: [`\"typescript\" | \"babel-ts\"`](./src/embedded/ts/options.ts)\n- **Default**: [`\"typescript\"`](./src/embedded/ts/options.ts)\n- **Description**: The parser used to parse the embedded TypeScript language.\n\nFormatting embedded TypeScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\nIf you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).\n\n#### XML\n\n##### `embeddedXmlComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"xml\", \"opml\", \"rss\", \"svg\"]`](./src/embedded/xml/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.\n\n##### `embeddedXmlTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"xml\", \"opml\", \"rss\", \"svg\"]`](./src/embedded/xml/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.\n\n##### ~~`embeddedXmlIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"xml\", \"opml\", \"rss\", \"svg\"]`](./src/embedded/xml/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.\n\nPlease use `embeddedXmlComments` or `embeddedXmlTags`.\n\n\u003c/details\u003e\n\nFormatting embedded XML language requires the [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-xml#configuration) supported by `@prettier/plugin-xml` can therefore be used to further control the formatting behavior.\n\n#### YAML\n\n##### `embeddedYamlComments`\n\n- **Type**: `string[]`\n- **Default**: [`[\"yaml\", \"yml\"]`](./src/embedded/yaml/options.ts)\n- **Description**: Block comments that make their subsequent template literals be identified as embedded YAML language.\n\n##### `embeddedYamlTags`\n\n- **Type**: `string[]`\n- **Default**: [`[\"yaml\", \"yml\"]`](./src/embedded/yaml/options.ts)\n- **Description**: Tags that make their subsequent template literals be identified as embedded YAML language.\n\n##### ~~`embeddedYamlIdentifiers`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: [`[\"yaml\", \"yml\"]`](./src/embedded/yaml/options.ts)\n- **Description**: Comment or tag identifiers that make their subsequent template literals be identified as embedded YAML language.\n\nPlease use `embeddedYamlComments` or `embeddedYamlTags`.\n\n\u003c/details\u003e\n\nFormatting embedded YAML language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.\n\n\u003c/details\u003e\n\n### Language-Agnostic Options\n\n#### Language-Agnostic\n\n##### ~~`noEmbeddedIdentificationByComment`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: `[]`\n- **Description**: Turns off `` /* comment */ `...` `` comment-based embedded language identification for the specified identifiers.\n\nPlease use `embedded\u003cLanguage\u003eComments` or `embedded\u003cLanguage\u003eTags` to configure each embedded language, and you won't need this option anymore.\n\n\u003c/details\u003e\n\n##### ~~`noEmbeddedIdentificationByTag`~~\n\n\u003cdetails\u003e\n\u003csummary\u003edeprecated\u003c/summary\u003e\n\n- **Type**: `string[]`\n- **Default**: `[]`\n- **Description**: Turns off `` tag`...` `` tag-based embedded language identification for the specified identifiers.\n\nPlease use `embedded\u003cLanguage\u003eComments` or `embedded\u003cLanguage\u003eTags` to configure each embedded language, and you won't need this option anymore.\n\n\u003c/details\u003e\n\n##### `preserveEmbeddedExteriorWhitespaces`\n\n- **Type**: `string[]`\n- **Default**: `[]`\n- **Description**: Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags.\n\n##### `noEmbeddedMultiLineIndentation`\n\n- **Type**: `string[]`\n- **Default**: `[]`\n- **Description**: Turns off auto indentation in the formatting results for the specified comments or tags when they are formatted to span multi lines.\n\n##### `embeddedOverrides`\n\n- **Type**: `string`\n- **Default**: `undefined`\n- **Description**: Option overrides for the specified comments or tags. It should either be a stringified JSON or an absolute filepath to the option overrides file. See [below](#embeddedoverrides-1) for a detailed explanation.\n\n#### `embeddedOverrides`\n\nThis option is provided for users to override certain options based on comments or tags. Due to the lack of support for using objects in prettier plugin options (https://github.com/prettier/prettier/issues/14671), it accepts a **stringified** json string, or a file path with an extension of `.json`, `.jsonc`, `.js`, `.cjs`, `.mjs`, `.ts`, `.cts` or `.mts` as its value. If no extension is provided, it will be treated as a `.json`/`.jsonc` file. For relative paths, it will automatically figure out the prettier config location and use that as the base path.\n\n\u003e [!NOTE]\n\u003e\n\u003e The support for using `.ts`, `.mts` or `.cts` files for `embeddedOverrides` requires a minimal `node` version of [18.19.0](https://nodejs.org/en/blog/release/v18.19.0#esm-and-customization-hook-changes), and [`tsx`](https://github.com/privatenumber/tsx) as a dependency in your project. And it currently doesn't work with the Prettier VSCode extension.\n\nThe resolved value should be an array of objects. Each object in the array must have 2 fields: `comments` and `options`, or `tags` and `options`. The `options` are considerred overrides that will be applied to the global `options` of prettier for those `comments` and `tags` only. It's like the [`overrides`](https://prettier.io/docs/en/configuration.html#configuration-overrides) of `prettier`, but it is comment/tag-based instead of file-based.\n\nIn a json file, the root is the array of objects. In a JavaScript/TypeScript file, the array of objects should be a default export, or a named export with the name `embeddedOverrides`.\n\nAn example `.json`/`.jsonc` file is:\n\n```json\n[\n  {\n    \"comments\": [\"sql\"],\n    \"options\": {\n      \"keywordCase\": \"lower\"\n    }\n  },\n  {\n    \"tags\": [\"mysql\"],\n    \"options\": {\n      \"keywordCase\": \"upper\"\n    }\n  }\n]\n```\n\n\u003e [!CAUTION]\n\u003e\n\u003e Please note that not every option is supported to override. That largely depends on at which phase those options will kick in and take effect. For example, you can't override `tabWidth` in `embeddedOverrides` because this option is used in the [`printDocToString`](https://github.com/prettier/prettier/blob/7aecca5d6473d73f562ca3af874831315f8f2581/src/document/printer.js#L302) phase, where `prettier-plugin-embed` cannot override this option for only a set of specified comments or tags. To find the list of unsupported options, please check the interface definition of `EmbeddedOverride` in the [source code](https://github.com/Sec-ant/prettier-plugin-embed/blob/main/src/types.ts).\n\n### Typed Options\n\nThere're several ways to use the typed options provided by this plugin. Taking the embedded SQL language as an example:\n\n- **Augment the `Options` type from `Prettier` to use plugin-specific options**\n\n  Register options from `prettier-plugin-embed` (this plugin):\n\n  ```ts\n  /// \u003creference types=\"prettier-plugin-embed/plugin-embed\" /\u003e\n  ```\n\n  Register options from `prettier-plugin-sql`:\n\n  ```ts\n  /// \u003creference types=\"prettier-plugin-embed/embedded/sql/plugin-sql\" /\u003e\n  ```\n\n  Other embedded languages share the same pattern:\n\n  ```ts\n  /// \u003creference types=\"prettier-plugin-embed/embedded/\u003clanguage\u003e/\u003c(no prettier or scope) plugin name\u003e\" /\u003e\n  ```\n\n- **Import plugin-specific options**\n\n  Import options from `prettier-plugin-embed` (this plugin):\n\n  ```ts\n  import type { PluginEmbedOptions } from \"prettier-plugin-embed\";\n  ```\n\n  Import options from `prettier-plugin-sql`:\n\n  ```ts\n  import type { PluginSqlOptions } from \"prettier-plugin-embed/embedded/sql/plugin-sql-types\";\n  ```\n\n  **NOTE:** You can also import the types from the `prettier-plugin-sql` plugin directly. However, not all of the plugins provide types, or provide them in a predictable way, so this plugin exports them in a more unified manner.\n\n  Other embedded languages share the same pattern:\n\n  ```ts\n  import type { Plugin\u003cLanguage\u003eOptions } from \"prettier-plugin-embed/embedded/\u003clanguage\u003e/\u003c(no prettier or scope) plugin name\u003e-types\";\n  ```\n\n- **Use `JSDoc` in JavaScript files**\n\n  ```js\n  /**\n   * @type {import(\"prettier-plugin-embed\").PluginEmbedOptions}\n   */\n  const pluginEmbedOptions = {\n    embeddedSqlTags: [\"sql\"],\n  };\n\n  /**\n   * @type {import(\"prettier-plugin-embed/embedded/sql/plugin-sql-types\").PluginSqlOptions}\n   */\n  const pluginSqlOptions = {\n    language: \"postgresql\",\n    keywordCase: \"upper\",\n  };\n  ```\n\n## Contributing\n\nBug fixes, new language support and tests are welcome. Please have a look at the project structure before getting started. Feel free to leave questions or suggestions.\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://upleveled.io\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1935696?v=4?s=100\" width=\"100px;\" alt=\"Karl Horky\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKarl Horky\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-karlhorky\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#doc-karlhorky\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://math-atlas.vercel.app\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/64682375?v=4?s=100\" width=\"100px;\" alt=\"Kelvin Soh\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKelvin Soh\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-kelvinsjk\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.1stg.me\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/8336744?v=4?s=100\" width=\"100px;\" alt=\"JounQin\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJounQin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-JounQin\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsec-ant%2Fprettier-plugin-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsec-ant%2Fprettier-plugin-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsec-ant%2Fprettier-plugin-embed/lists"}