{"id":13485110,"url":"https://github.com/vim-denops/deno-denops-std","last_synced_at":"2025-07-09T00:32:11.029Z","repository":{"id":37117430,"uuid":"338645421","full_name":"vim-denops/deno-denops-std","owner":"vim-denops","description":"📚 Standard module for denops.vim","archived":false,"fork":false,"pushed_at":"2024-04-14T00:43:21.000Z","size":2502,"stargazers_count":56,"open_issues_count":9,"forks_count":15,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-04-14T15:22:15.900Z","etag":null,"topics":["vim-denops"],"latest_commit_sha":null,"homepage":"https://deno.land/x/denops_std","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/vim-denops.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}},"created_at":"2021-02-13T18:50:45.000Z","updated_at":"2024-08-03T07:41:12.085Z","dependencies_parsed_at":"2023-02-19T13:45:41.433Z","dependency_job_id":"4b11f7da-023d-43fb-b2bc-57040f70575f","html_url":"https://github.com/vim-denops/deno-denops-std","commit_stats":{"total_commits":322,"total_committers":17,"mean_commits":"18.941176470588236","dds":0.515527950310559,"last_synced_commit":"fb160c7691554469a9127b20be5acf7efb10c6be"},"previous_names":[],"tags_count":146,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-denops%2Fdeno-denops-std","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-denops%2Fdeno-denops-std/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-denops%2Fdeno-denops-std/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-denops%2Fdeno-denops-std/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vim-denops","download_url":"https://codeload.github.com/vim-denops/deno-denops-std/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225472766,"owners_count":17479680,"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":["vim-denops"],"created_at":"2024-07-31T17:01:46.320Z","updated_at":"2024-11-20T05:22:33.269Z","avatar_url":"https://github.com/vim-denops.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# 🐜 @denops/std\n\n[![JSR](https://jsr.io/badges/@denops/std)](https://jsr.io/@denops/std)\n[![Test](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml/badge.svg)](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml)\n[![codecov](https://codecov.io/github/vim-denops/deno-denops-std/branch/main/graph/badge.svg?token=RKAZMUQ3D9)](https://codecov.io/github/vim-denops/deno-denops-std)\n\n[![Deno 1.45.0 or above](https://img.shields.io/badge/Deno-Support%201.45.0-yellowgreen.svg?logo=deno)](https://github.com/denoland/deno/tree/v1.45.0)\n[![Vim 9.1.0448 or above](https://img.shields.io/badge/Vim-Support%209.1.0448-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v9.1.0448)\n[![Neovim 0.10.0 or above](https://img.shields.io/badge/Neovim-Support%200.10.0-yellowgreen.svg?logo=neovim\u0026logoColor=white)](https://github.com/neovim/neovim/tree/v0.10.0)\n\nStandard module for [denops.vim].\n\nThis module is assumed to be used for developing denops plugins. The code is\nassumed to be called in a dedicated worker thread.\n\nBy using this module, developers can write Vim/Neovim denops plugins like:\n\n```typescript\nimport type { Denops } from \"jsr:@denops/std\";\nimport * as batch from \"jsr:@denops/std/batch\";\nimport * as fn from \"jsr:@denops/std/function\";\nimport * as vars from \"jsr:@denops/std/variable\";\nimport * as helper from \"jsr:@denops/std/helper\";\n\nimport { assert, is } from \"jsr:@core/unknownutil\";\n\nexport function main(denops: Denops): void {\n  denops.dispatcher = {\n    async init() {\n      // This is just an example. Developers usually should define commands directly in Vim script.\n      await batch.batch(denops, async (denops) =\u003e {\n        await denops.cmd(\n          `command! HelloWorld call denops#notify(\"${denops.name}\", \"say\", [\"World\"])`,\n        );\n        await denops.cmd(\n          `command! HelloDenops call denops#notify(\"${denops.name}\", \"say\", [\"Denops\"])`,\n        );\n      });\n    },\n    async say(where) {\n      assert(where, is.String);\n      const [name, progname] = await batch.collect(denops, (denops) =\u003e [\n        fn.input(denops, \"Your name: \"),\n        vars.v.get(denops, \"progname\"),\n      ]);\n      const messages = [\n        `Hello ${where}.`,\n        `Your name is ${name}.`,\n        `This is ${progname}.`,\n      ];\n      await helper.echo(denops, messages.join(\"\\n\"));\n    },\n  };\n}\n```\n\n**Note that developers should avoid calling initialization code within the\n`main` function**. If necessary, add an `init` API or a similar approach like\nabove and call it from `plugin/\u003cyour_plugin\u003e.vim`.\n\nSee [Denops Documentation] or [denops-helloworld.vim] for more details.\n\n[denops.vim]: https://github.com/vim-denops/denops.vim\n[Denops Documentation]: https://vim-denops.github.io/denops-documentation\n[denops-helloworld.vim]: https://github.com/vim-denops/denops-helloworld.vim\n\n## License\n\nThe code follows MIT license written in [LICENSE](./LICENSE). Contributors need\nto agree that any modifications sent in this repository follow the license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-denops%2Fdeno-denops-std","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvim-denops%2Fdeno-denops-std","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-denops%2Fdeno-denops-std/lists"}