-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from vim-denops/v6-pre
π Rewrite documentation for denops v6
- Loading branch information
Showing
57 changed files
with
5,239 additions
and
513 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
/.tools | ||
/book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exclude": ["theme/**/*", "book/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# FAQ | ||
|
||
## How to Check Denops Startup Time | ||
|
||
To check the startup time of Denops or Denops plugins, utilize | ||
[denops-startup-recorder]. This plugin visualizes the timing of events related | ||
to Denops and Denops plugin startup. | ||
|
||
[denops-startup-recorder]: https://github.com/vim-denops/denops-startup-recorder.vim | ||
|
||
It shows the result in echo area like: | ||
|
||
![](./img/faq-1.png) | ||
|
||
## How to Check Denops Performance | ||
|
||
To assess Denops performance, employ [denops-benchmark]. This plugin measures | ||
the number of operations or characters that can be processed in milliseconds. | ||
|
||
[denops-benchmark]: https://github.com/vim-denops/denops-benchmark.vim | ||
|
||
It shows the result in a buffer like: | ||
|
||
![](./img/faq-2.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Getting Started | ||
|
||
[Denops] ([/ΛdiΛnoΚps/](http://ipa-reader.xyz/?text=%CB%88di%CB%90no%CA%8Aps), | ||
pronounced `dee-nops`) is an ecosystem for [Vim] / [Neovim] that empowers | ||
developers to write plugins in [TypeScript] / [JavaScript] powered by [Deno]. | ||
|
||
Let's start by creating a simple plugin to learn how to develop Denops plugins. | ||
|
||
## Create a Plugin | ||
|
||
Create a directory named `denops-getting-started` in your home directory and a | ||
file named `main.ts` within it, under `denops/denops-getting-started/`: | ||
|
||
``` | ||
$HOME | ||
βββ denops-getting-started | ||
βββ denops | ||
βββ denops-getting-started | ||
βββ main.ts | ||
``` | ||
|
||
Next, write the following TypeScript code in `main.ts`: | ||
|
||
```typescript | ||
import type { Denops } from "https://deno.land/x/denops_std@v6.0.0/mod.ts"; | ||
|
||
export function main(denops: Denops): void { | ||
denops.dispatcher = { | ||
async hello() { | ||
await denops.cmd(`echo "Hello, Denops!"`); | ||
}, | ||
}; | ||
} | ||
``` | ||
|
||
## Activate the Plugin | ||
|
||
Add the following line to your Vim or Neovim configuration file (e.g., | ||
`~/.vimrc` or `~/.config/nvim/init.vim`): | ||
|
||
```vim | ||
set runtimepath+=~/denops-getting-started | ||
``` | ||
|
||
Or Neovim Lua configuration file (e.g., `~/.config/nvim/init.lua`): | ||
|
||
```lua | ||
vim.opt.runtimepath:append("~/denops-getting-started") | ||
``` | ||
|
||
## Try the Plugin | ||
|
||
Restart Vim/Neovim and execute the following command: | ||
|
||
```vim | ||
:call denops#request('denops-getting-started', 'hello', []) | ||
``` | ||
|
||
You should see "Hello, Denops!" displayed on the screen like: | ||
|
||
![](./img/README-01.png) | ||
|
||
[Denops]: https://github.com/vim-denops/denops.vim | ||
[Vim]: https://www.vim.org/ | ||
[Neovim]: https://neovim.io/ | ||
[TypeScript]: https://www.typescriptlang.org/ | ||
[JavaScript]: https://developer.mozilla.org/en-US/docs/Web/JavaScript | ||
[Deno]: https://deno.land/ |
Oops, something went wrong.