Skip to content

Commit 95b3be6

Browse files
committed
📝 Simplify module README
1 parent 54f27fa commit 95b3be6

File tree

1 file changed

+1
-43
lines changed

1 file changed

+1
-43
lines changed

denops_std/README.md

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,7 @@
55
[![Documentation](https://img.shields.io/badge/denops-Documentation-yellow.svg)](https://vim-denops.github.io/denops-documentation/)
66
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x/denops__std-lightgrey.svg?logo=deno)](https://deno.land/x/denops_std)
77

8-
[Deno][deno] module for [denops.vim][denops.vim]. This module is assumed to be
9-
used in denops plugin and the code is assumed to be called in a worker thread
10-
for a plugin.
11-
12-
By using this module, developers can write Vim/Neovim denops plugins like:
13-
14-
```typescript
15-
import { Denops } from "./mod.ts";
16-
import * as fn from "./function/mod.ts";
17-
import * as vars from "./variable/mod.ts";
18-
import * as helper from "./helper/mod.ts";
19-
20-
import { assertString } from "https://deno.land/x/unknownutil/mod.ts";
21-
22-
export async function main(denops: Denops): Promise<void> {
23-
denops.dispatcher = {
24-
async say(where: unknown): Promise<void> {
25-
// Ensure that `where` is `string` here
26-
assertString(where);
27-
const name = await fn.input(denops, "Your name: ");
28-
const progname = await vars.v.get(denops, "progname");
29-
const messages = [
30-
`Hello ${where}.`,
31-
`Your name is ${name}.`,
32-
`This is ${progname}.`,
33-
];
34-
await helper.echo(denops, messages.join("\n"));
35-
},
36-
};
37-
38-
await helper.execute(
39-
denops,
40-
`
41-
command! HelloWorld call denops#notify("${denops.name}", "say", ["World"])
42-
command! HelloDenops call denops#notify("${denops.name}", "say", ["Denops"])
43-
`,
44-
);
45-
}
46-
```
47-
48-
See [Denops Documentation](https://vim-denops.github.io/denops-documentation/)
49-
or [denops-helloworld.vim](https://github.com/vim-denops/denops-helloworld.vim)
50-
for more details.
8+
[Deno][deno] module for [denops.vim][denops.vim].
519

5210
[deno]: https://deno.land/
5311
[denops.vim]: https://github.com/vim-denops/denops.vim

0 commit comments

Comments
 (0)