{"id":18109671,"url":"https://github.com/val-town/codemirror-continue","last_synced_at":"2025-04-14T14:14:59.257Z","repository":{"id":216366977,"uuid":"732183169","full_name":"val-town/codemirror-continue","owner":"val-town","description":"Continue block comments in CodeMirror","archived":false,"fork":false,"pushed_at":"2025-01-14T16:01:31.000Z","size":89,"stargazers_count":20,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T14:14:51.462Z","etag":null,"topics":["codemirror","codemirror6"],"latest_commit_sha":null,"homepage":"https://val-town.github.io/codemirror-continue/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/val-town.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-12-15T21:25:29.000Z","updated_at":"2025-03-11T02:20:55.000Z","dependencies_parsed_at":"2025-01-14T16:51:00.768Z","dependency_job_id":"4e0e84a0-0a9b-4e00-b39c-f8e1fdf7bc57","html_url":"https://github.com/val-town/codemirror-continue","commit_stats":null,"previous_names":["val-town/codemirror-continue"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-town%2Fcodemirror-continue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-town%2Fcodemirror-continue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-town%2Fcodemirror-continue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-town%2Fcodemirror-continue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/val-town","download_url":"https://codeload.github.com/val-town/codemirror-continue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894943,"owners_count":21179153,"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":["codemirror","codemirror6"],"created_at":"2024-11-01T00:01:53.648Z","updated_at":"2025-04-14T14:14:59.251Z","avatar_url":"https://github.com/val-town.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# @valtown/codemirror-continue\n\n\u003ca href=\"https://www.npmjs.com/package/@valtown/codemirror-continue\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@valtown/codemirror-continue.svg\" alt=\"npm\"\u003e\u003c/a\u003e\n\nThis **continues block comments when you\nhit Enter** in [CodeMirror](https://codemirror.net/).\n\nLike when you're typing and you're here:\n\n```ts\n/**\u003ccursor\u003e\n```\n\nWhen you hit enter, you want it to do this:\n\n```ts\n/**\n * \u003ccursor\u003e\n```\n\nRight? Well, this CodeMirror extension does just that. It\nalso handles the case where you're on the last line of a\ncomment, like\n\n```ts\n/**\n * My comment\n * \u003ccursor\u003e\n```\n\nAnd you hit `/`, it'll _delete_ the previous space, giving you\n\n```ts\n/**\n * My comment\n */\n```\n\nSpectacular! Get it?\n\n## Usage\n\nImport `continueKeymap`:\n\n```ts\nimport { continueKeymap } from \"@valtown/codemirror-continue\";\n```\n\nImport `keymap` and `Prec`:\n\n```ts\nimport { Prec } from \"@codemirror/state\";\nimport { keymap } from \"@codemirror/view\";\n```\n\nAdd the keybinding to your CodeMirror instance's `extensions` array:\n\n```ts\nextensions: [\n  basicSetup,\n  // … other setup\n  Prec.high(keymap.of(continueKeymap)),\n],\n```\n\nAnd that's it! This will only do anything if your CodeMirror\nis using a language that supports `/* */` style block comments,\nlike JavaScript and TypeScript.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fval-town%2Fcodemirror-continue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fval-town%2Fcodemirror-continue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fval-town%2Fcodemirror-continue/lists"}