-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💥 Read
meta
only once in initialization
This is a minor but a breaking change. This change affects the `g:denops#debug` variable. After this commit, the variable must be configured prior to the denops initialization.
- Loading branch information
1 parent
860918e
commit e91e0a1
Showing
5 changed files
with
26 additions
and
30 deletions.
There are no files selected for viewing
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,9 +1,11 @@ | ||
import { ensure } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { parse } from "https://deno.land/[email protected]/flags/mod.ts"; | ||
import { pop } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { usingResource } from "https://deno.land/x/[email protected]/mod.ts#^"; | ||
import { Service } from "./service.ts"; | ||
import { Vim } from "./host/vim.ts"; | ||
import { Neovim } from "./host/nvim.ts"; | ||
import { isMeta } from "./util.ts"; | ||
|
||
type Host = typeof Vim | typeof Neovim; | ||
|
||
|
@@ -35,7 +37,8 @@ async function handleConn(conn: Deno.Conn): Promise<void> { | |
|
||
// Create host and service | ||
await usingResource(new hostClass(r2, writer), async (host) => { | ||
await usingResource(new Service(host), async (_service) => { | ||
const meta = ensure(await host.call("denops#_internal#meta#get"), isMeta); | ||
await usingResource(new Service(host, meta), async (_service) => { | ||
await host.call("execute", "doautocmd <nomodeline> User DenopsReady"); | ||
await host.waitClosed(); | ||
if (!quiet) { | ||
|
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,6 +1,5 @@ | ||
import { is } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { Service } from "../service.ts"; | ||
import type { Meta } from "../../@denops/mod.ts"; | ||
|
||
export type RegisterOptions = { | ||
/** | ||
|
@@ -33,20 +32,18 @@ export class Invoker { | |
register( | ||
name: string, | ||
script: string, | ||
meta: Meta, | ||
options: RegisterOptions, | ||
trace: boolean, | ||
): void { | ||
this.#service.register(name, script, meta, options, trace); | ||
this.#service.register(name, script, options, trace); | ||
} | ||
|
||
reload( | ||
name: string, | ||
meta: Meta, | ||
options: ReloadOptions, | ||
trace: boolean, | ||
): void { | ||
this.#service.reload(name, meta, options, trace); | ||
this.#service.reload(name, options, trace); | ||
} | ||
|
||
dispatch(name: string, fn: string, args: unknown[]): Promise<unknown> { | ||
|
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