{"id":18048536,"url":"https://github.com/bent10/monaco-plugin-emmet","last_synced_at":"2025-07-16T11:09:10.042Z","repository":{"id":184986586,"uuid":"672796894","full_name":"bent10/monaco-plugin-emmet","owner":"bent10","description":"Provides Emmet abbreviation expansion and completion support for Monaco Editor, for faster and more efficient HTML, CSS, and other code generation.","archived":false,"fork":false,"pushed_at":"2023-12-19T09:14:32.000Z","size":135,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-20T13:53:42.025Z","etag":null,"topics":["autocomplete","emmet","monaco","monaco-editor","monaco-plugin","monaco-snippet","snippet","suggestion"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/monaco-plugin-emmet","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/bent10.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}},"created_at":"2023-07-31T07:29:44.000Z","updated_at":"2024-01-14T01:38:55.443Z","dependencies_parsed_at":"2023-07-31T09:15:38.766Z","dependency_job_id":"9b3f4abc-e165-4167-a9d1-8e94f1929e57","html_url":"https://github.com/bent10/monaco-plugin-emmet","commit_stats":null,"previous_names":["bent10/monaco-plugin-emmet"],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Fmonaco-plugin-emmet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Fmonaco-plugin-emmet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Fmonaco-plugin-emmet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Fmonaco-plugin-emmet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bent10","download_url":"https://codeload.github.com/bent10/monaco-plugin-emmet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289435,"owners_count":20914464,"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":["autocomplete","emmet","monaco","monaco-editor","monaco-plugin","monaco-snippet","snippet","suggestion"],"created_at":"2024-10-30T20:13:17.651Z","updated_at":"2025-04-05T05:17:09.420Z","avatar_url":"https://github.com/bent10.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monaco Plugin Emmet\n\nProvides Emmet abbreviation expansion and completion support for Monaco Editor, for faster and more efficient HTML, CSS, and other code generation.\n\n## Install\n\n```bash\nnpm i monaco-plugin-emmet\n```\n\nOr\n\n```bash\nyarn add monaco-plugin-emmet\n```\n\n## Usage\n\n```js\nimport { registerEmmet } from 'monaco-plugin-emmet'\n\n// Register Emmet completion provider for 'html' language with predefined snippets\nregisterEmmet(monaco, ['html'], {\n  html: { card: '.card\u003e.card-body{${0}}' }\n})\n\n// Your Monaco Editor implementation here...\n```\n\nFor a more comprehensive understanding of the Browser implementation, please refer to the file `index.html`, which contains the necessary code and configurations.\n\n## API\n\n### `registerEmmet(monaco, langs, snippetsGroup)`\n\nRegisters the Emmet completion provider for the specified languages and snippet groups.\n\n- `monaco`: The Monaco Editor instance.\n- `langs`: An array of language identifiers for which to register the completion provider.\n- `snippetsGroup`: An optional object representing a group of snippets for different languages.\n\n### `createSnippets(model, position, snippetsMap)`\n\nCreates snippets for the specified model, position, and snippet map.\n\n- `model`: The Monaco Editor text model.\n- `position`: The position in the text model where snippets are created.\n- `snippetsMap`: A map of snippets where the keys are the snippet names and the values are the snippet content.\n\n```ts\n// Register custom snippets for the 'html' language\nimport { createSnippets, SnippetsMap } from 'monaco-plugin-emmet'\n\nconst htmlSnippets: SnippetsMap = {\n  card: '.card\u003e.card-body{${1}}',\n  'btn:primary': 'button[class=\"${1:btn btn-primary}\"]{${2}}'\n}\n\nmonaco.languages.registerCompletionItemProvider('html', {\n  provideCompletionItems(model, position) {\n    return {\n      suggestions: createSnippets(model, position, htmlSnippets)\n    }\n  }\n})\n```\n\n## Contributing\n\nWe 💛\u0026nbsp; issues.\n\nWhen committing, please conform to [the semantic-release commit standards](https://www.conventionalcommits.org/). Please install `commitizen` and the adapter globally, if you have not already.\n\n```bash\nnpm i -g commitizen cz-conventional-changelog\n```\n\nNow you can use `git cz` or just `cz` instead of `git commit` when committing. You can also use `git-cz`, which is an alias for `cz`.\n\n```bash\ngit add . \u0026\u0026 git cz\n```\n\n## License\n\n![GitHub](https://img.shields.io/github/license/bent10/monaco-plugin-emmet)\n\nA project by [Stilearning](https://stilearning.com) \u0026copy; 2021-2023.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbent10%2Fmonaco-plugin-emmet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbent10%2Fmonaco-plugin-emmet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbent10%2Fmonaco-plugin-emmet/lists"}