{"library":"prettier-plugin-embed","title":"Prettier Plugin Embed","description":"A configurable Prettier plugin for formatting embedded languages (SQL, XML, PHP, markdown, CSS, etc.) in JavaScript/TypeScript template literals. Version 0.5.1, active development with frequent releases. Unlike Prettier's built-in 'auto' mode, it allows per-language control, custom block comments/tags for language detection, and opt-out per tag. Ships TypeScript types. Supports additional languages beyond Prettier defaults, with options for indentation and formatting behavior.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-embed"],"cli":null},"imports":["import prettierPluginEmbed from 'prettier-plugin-embed'","import type { EmbedOptions } from 'prettier-plugin-embed'","plugins: [prettierPluginEmbed]"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// .prettierrc.js\nmodule.exports = {\n  plugins: [require('prettier-plugin-embed')],\n  // Optional: configure embedded languages\n  embeddedLanguageFormatting: 'off', // disable built-in to avoid conflicts\n  embed: {\n    // Enable SQL formatting in template literals tagged with sql\n    tags: ['sql'],\n    // Or use comments: /** sql */ `SELECT * FROM users`\n    comments: ['sql'],\n  },\n};\n\n// Example file: example.js\nconst sql = 'SELECT * FROM users WHERE id = 1';\n// After formatting, SQL in template literals tagged with sql is formatted\nconst query = sql`SELECT * FROM users WHERE id = 1`;\n","lang":"javascript","description":"Shows basic setup: install plugin, add to Prettier config, enable formatting for SQL template literals tagged with 'sql'.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}