{"id":18013405,"url":"https://github.com/milly/ddc-unprintable","last_synced_at":"2025-08-02T01:40:16.153Z","repository":{"id":64419623,"uuid":"575333293","full_name":"Milly/ddc-unprintable","owner":"Milly","description":"Development ddc.vim helpers that allow you to paste word-kind sources gathering unprintable characters.","archived":false,"fork":false,"pushed_at":"2025-07-21T01:21:33.000Z","size":54,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T16:33:35.229Z","etag":null,"topics":["ddc-vim","vim-denops"],"latest_commit_sha":null,"homepage":"https://jsr.io/@milly/ddc-unprintable","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/Milly.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,"zenodo":null}},"created_at":"2022-12-07T09:22:02.000Z","updated_at":"2025-07-21T01:13:23.000Z","dependencies_parsed_at":"2024-04-10T10:26:00.526Z","dependency_job_id":"36d50830-36a4-4231-adcc-5a64abff37b4","html_url":"https://github.com/Milly/ddc-unprintable","commit_stats":null,"previous_names":["milly/ddc-unprintable"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Milly/ddc-unprintable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fddc-unprintable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fddc-unprintable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fddc-unprintable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fddc-unprintable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Milly","download_url":"https://codeload.github.com/Milly/ddc-unprintable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fddc-unprintable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326421,"owners_count":24232476,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ddc-vim","vim-denops"],"created_at":"2024-10-30T03:21:22.951Z","updated_at":"2025-08-02T01:40:16.104Z","avatar_url":"https://github.com/Milly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ddc-unprintable\n\n[![license:MIT](https://img.shields.io/github/license/Milly/ddc-unprintable?style=flat-square)](LICENSE)\n[![jsr](https://jsr.io/badges/@milly/ddc-unprintable)](https://jsr.io/@milly/ddc-unprintable)\n\n_ddc-unprintable_ is helper library for [ddc.vim] sources in [Denops]. This\nmodule contains helpers that allow you to paste word-kind sources gathering\nunprintable characters.\n\n[ddc.vim]: https://github.com/Shougo/ddc.vim\n[Denops]: https://github.com/vim-denops/denops.vim\n\n## Usage\n\n1. Instantiate `Unprintable` class in your ddc source.\n2. Call `onInit()` in your `Source.onInit()` method to initialize instance.\n3. Call `convertItems()` in your `Source.gather()` method to process completion\n   items.\n4. Call `onCompleteDone()` in your `Source.onCompleteDone()` method to restore\n   the original text.\n\nExample of using this module in your source:\n\n```ts\nimport { Unprintable, UnprintableUserData } from \"jsr:@milly/ddc-unprintable\";\nimport {\n  BaseSource,\n  type GatherArguments,\n  type OnCompleteDoneArguments,\n  type OnInitArguments,\n} from \"jsr:@shougo/ddc-vim/source\";\nimport type { Item } from \"jsr:@shougo/ddc-vim/types\";\n\ninterface MyParams extends Record\u003cstring, unknown\u003e {\n  // Add your source parameters here\n}\n\ninterface MyUserData extends UnprintableUserData {\n  // Add your user data properties here\n}\n\ntype MyItem = Item\u003cMyUserData\u003e;\n\nexport class Source extends BaseSource\u003cMyParams, MyUserData\u003e {\n  // 1. Instantiate this class.\n  #unprintable = new Unprintable\u003cMyUserData\u003e();\n\n  override params(): MyParams {\n    return {};\n  }\n\n  override async onInit(args: OnInitArguments\u003cMyParams\u003e): Promise\u003cvoid\u003e {\n    // 2. Call `onInit()`.\n    await this.#unprintable.onInit(args);\n  }\n\n  override async gather(\n    args: GatherArguments\u003cMyParams\u003e,\n  ): Promise\u003cMyItem[]\u003e {\n    const myItems: MyItem[] = [\n      // Generate your items here.\n    ];\n\n    // 3. Call `convertItems()`.\n    const convertedItems = await this.#unprintable!.convertItems(\n      args.denops,\n      myItems,\n      args.context.nextInput,\n    );\n\n    return convertedItems;\n  }\n\n  override async onCompleteDone(\n    args: OnCompleteDoneArguments\u003cMyParams, MyUserData\u003e,\n  ): Promise\u003cvoid\u003e {\n    // 4. Call `onCompleteDone()`.\n    await this.#unprintable.onCompleteDone(args);\n  }\n}\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file\nfor details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilly%2Fddc-unprintable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilly%2Fddc-unprintable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilly%2Fddc-unprintable/lists"}