Skip to content

Commit

Permalink
Improve check
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Feb 5, 2024
1 parent 50e648f commit 62da102
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions autoload/ddc/denops.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ function ddc#denops#_init(opts = {}) abort

" NOTE: ddc.vim must be registered manually.
if 'g:loaded_denops'->exists() &&
\ (denops#server#status() ==# 'preparing' ||
\ ('<amatch>'->expand() ==# 'DenopsReady' ||
\ denops#server#status() ==# 'running')
silent! call s:register()
call s:register()
else
autocmd ddc User DenopsReady silent! call s:register()
autocmd ddc User DenopsReady call s:register()
endif
endfunction

Expand Down
6 changes: 3 additions & 3 deletions denops/ddc/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
fn,
is,
op,
vimOp,
vars,
} from "./deps.ts";
import {
Expand Down Expand Up @@ -374,9 +375,8 @@ async function cacheWorld(denops: Denops, event: DdcEvent): Promise<World> {
_call(denops, "eskk#is_enabled", false),
_call(denops, "skkeleton#is_enabled", false),
op.iminsert.getLocal(denops),
// NOTE: op.paste does not work in denops_std@v6.0.0
//op.paste.get(denops),
denops.call("eval", "&paste") as Promise<boolean>,
// NOTE: op.paste is deprecated in neovim
vimOp.paste.get(denops),
fn.line(denops, "."),
fn.wildmenumode(denops) as Promise<number>,
]);
Expand Down
15 changes: 8 additions & 7 deletions denops/ddc/deps.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
export type { Denops } from "https://deno.land/x/denops_std@v6.0.0/mod.ts";
export type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
export {
echo,
execute,
} from "https://deno.land/x/denops_std@v6.0.0/helper/mod.ts";
} from "https://deno.land/x/denops_std@v6.0.1/helper/mod.ts";
export {
batch,
collect,
} from "https://deno.land/x/denops_std@v6.0.0/batch/mod.ts";
export * as op from "https://deno.land/x/denops_std@v6.0.0/option/mod.ts";
export * as fn from "https://deno.land/x/denops_std@v6.0.0/function/mod.ts";
export * as vars from "https://deno.land/x/denops_std@v6.0.0/variable/mod.ts";
export * as autocmd from "https://deno.land/x/denops_std@v6.0.0/autocmd/mod.ts";
} from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
export * as op from "https://deno.land/x/denops_std@v6.0.1/option/mod.ts";
export * as vimOp from "https://deno.land/x/denops_std@v6.0.1/option/vim/mod.ts";
export * as fn from "https://deno.land/x/denops_std@v6.0.1/function/mod.ts";
export * as vars from "https://deno.land/x/denops_std@v6.0.1/variable/mod.ts";
export * as autocmd from "https://deno.land/x/denops_std@v6.0.1/autocmd/mod.ts";
export * as base64 from "https://deno.land/std@0.214.0/encoding/base64.ts";
export {
assertEquals,
Expand Down

0 comments on commit 62da102

Please sign in to comment.