@@ -91,7 +91,7 @@ easily call.
9191In the Getting Started, we wrote the following code in the ` main.ts ` file:
9292
9393``` typescript
94- import type {
Entrypoint }
from " https://deno.land/x/[email protected] /mod.ts " ;
94+ import type {
Entrypoint }
from " jsr:@denops/[email protected] " ;
9595
9696export const main: Entrypoint = (denops ) => {
9797 denops .dispatcher = {
@@ -107,14 +107,14 @@ Let's break down this code step by step.
107107### About Imports
108108
109109``` typescript
110- import type {
Entrypoint }
from " https://deno.land/x/[email protected] /mod.ts " ;
110+ import type {
Entrypoint }
from " jsr:@denops/[email protected] " ;
111111```
112112
113- The first line imports the ` Entrypoint ` type from the [ denops_std ] standard
113+ The first line imports the ` Entrypoint ` type from the [ @ denops/std ] standard
114114library. You can find detailed information about the library by checking the
115- URL:
` https://deno.land/x/[email protected] .0 ` (
remove ` /mod.ts ` ).
We fixed the 116- version in the import URL, so it's recommended to check for details and update
117- to the latest version URL.
115+ URL:
` https://jsr.io/@denops/[email protected] .0 ` (
replace ` jsr: ` to ` https://jsr.io/ ` ).
116+ We fixed the version in the import URL, so it's recommended to check for details
117+ and update to the latest version URL.
118118
119119Note that we use ` import type ` syntax, which is part of TypeScript's
120120[ Type-Only Imports and Export] ( https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html ) .
@@ -130,28 +130,11 @@ meaning. Using `import { Entrypoint }` for a type-only import is also valid.
130130> [ ` denops/@denops-private/denops.ts ` ] ( https://github.com/vim-denops/denops.vim/blob/main/denops/%40denops-private/denops.ts ) ,
131131> but it is not publicly exposed for the reasons mentioned above.
132132>
133- > This type information is provided by [ denops_core ] , and [ denops_std ] simply
134- > re-exports the type information from [ denops_core ] . However, [ denops_core ] is
135- > intended to be referenced only by [ denops.vim] and [ denops_std ] , so Denops
133+ > This type information is provided by [ @ denops/core ] , and [ @ denops/std ] simply
134+ > re-exports the type information from [ @ denops/core ] . However, [ @ denops/core ]
135+ > is intended to be referenced only by [ denops.vim] and [ @ denops/std ] , so Denops
136136> plugin developers don't need to use it directly.
137137
138- > [ !NOTE]
139- >
140- > Prior to denops-std v6.5.0, the ` Entrypoint ` type was not defined thus
141- > developers must define the ` main ` function as like
142- >
143- > ``` typescript
144- > import type { Denops } from " https://deno.land/x/[email protected] /mod.ts" ;145- >
146- > export function main(denops : Denops ): void {
147- > denops .dispatcher = {
148- > async hello() {
149- > await denops .cmd (` echo "Hello, Denops!" ` );
150- > },
151- > };
152- > }
153- > ` ` `
154-
155138### About Entry Point
156139
157140``` typescript
@@ -162,8 +145,8 @@ export const main: Entrypoint = (denops) => {
162145
163146The above code exports the ` main ` function. The ` main ` function is called by
164147Denops, and it takes the
165- [ Denops instance] ( https://deno.land/x/denops_std/mod.ts?s= Denops ) (` denops ` ) as
166- an argument. Denops plugins use this ` denops ` to add user-defined APIs or call
148+ [ Denops instance] ( https://jsr.io/@denops/core/doc/~/ Denops ) (` denops ` ) as an
149+ argument. Denops plugins use this ` denops ` to add user-defined APIs or call
167150Vim's features.
168151
169152### About User-Defined APIs
@@ -222,17 +205,17 @@ several methods:
222205| ` eval ` | Evaluate a Vim expression and returns the result. If ` ctx ` is provided, it is expanded as local variables. |
223206| ` dispatch ` | Calls a user-defined API of another Denops plugin and returns the result. |
224207
225- Although ` denops ` provides low-level interfaces, [ denops_std ] combines these
208+ Although ` denops ` provides low-level interfaces, [ @ denops/std ] combines these
226209low-level interfaces to offer higher-level interfaces. Therefore, it's
227- recommended to use [ denops_std ] to call Vim's features in actual plugin
210+ recommended to use [ @ denops/std ] to call Vim's features in actual plugin
228211development.
229212
230213For example, use
231- [ ` function ` module
] ( https://deno.land/x/[email protected] .0/function/mod.ts ) to
232- call Vim's function instead of ` denops.call ` like:
214+ [ ` function ` module
] ( https://jsr.io/@denops/[email protected] .0/doc/ function/~ ) to
call 215+ Vim's function instead of ` denops.call ` like:
233216
234217``` typescript
235- import * as fn from " https://deno.land/x/[email protected] .0/function/mod.ts " ;
218+ import * as fn from " jsr:@denops/[email protected] .0/function" ;
236219
237220// Bad (result1 is `unknown`)
238221const result1 = await denops .call (" expand" , " %" );
@@ -251,8 +234,8 @@ plugin.
251234
252235- [ Tutorial (Hello World)] ( ../tutorial/helloworld/README.md )
253236- [ Tutorial (Maze)] ( ../tutorial/maze/README.md )
254- - [ API reference] ( https://deno.land/x/denops_std/mod.ts )
237+ - [ API reference] ( https://jsr.io/@denops/std )
255238
256239[ denops.vim ] : https://github.com/vim-denops/denops.vim
257- [ denops_std ] : https://deno.land/x/denops_std
258- [ denops_core ] : https://deno.land/x/denops_core
240+ [ @denops/std ] : https://jsr.io/@denops/std
241+ [ @denops/core ] : https://jsr.io/@denops/core
0 commit comments