Skip to content

Commit

Permalink
Merge pull request #188 from vim-skk/deno_kv
Browse files Browse the repository at this point in the history
Add Deno.KV check
  • Loading branch information
kuuote authored Feb 2, 2024
2 parents 076ef4d + b615608 commit d977480
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions denops/skkeleton/sources/deno_kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export class Source implements BaseSource {
async getDictionaries(): Promise<BaseDictionary[]> {
const globalDictionaries = await Promise.all(
config.globalDictionaries.map(async ([path, encodingName]) => {
if (!Deno.Kv) {
console.error("Deno KV initialization is failed");
console.error(
"'--unstable-kv' is needed for g:denops#server#deno_args.",
);
return undefined;
}

try {
const dict = await Dictionary.create(path, encodingName);
await dict.load();
Expand Down

0 comments on commit d977480

Please sign in to comment.