Skip to content

Commit

Permalink
Dump options
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Oct 1, 2023
1 parent f2e9536 commit 091e55d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autoload/dpp/min.vim
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function dpp#min#_load_cache_raw(vimrcs=[]) abort
if !(g:dpp#_vimrcs->copy()
\ ->map({ _, val -> getftime(expand(val)) })
\ ->filter({ _, val -> time < val })->empty())
return [{}, {}]
return [{}, {}, {}]
endif
return has('nvim') ? cache->readfile()->json_decode()
\ : cache->readfile()[0]->js_decode()
Expand Down
5 changes: 3 additions & 2 deletions denops/dpp/dpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,11 @@ export class Dpp {
`if g:dpp#_cache_version !=# ${cacheVersion} ` +
`|| g:dpp#_init_runtimepath !=# '${initRuntimepath}' | ` +
"throw 'Cache loading error' | endif",
"let [s:plugins, s:ftplugin] = dpp#min#_load_cache_raw()",
"let [s:plugins, s:ftplugin, s:options] = dpp#min#_load_cache_raw()",
"if s:plugins->empty() | throw 'Cache loading error' | endif",
"let g:dpp#_plugins = s:plugins",
"let g:dpp#ftplugin = s:ftplugin",
"let g:dpp#_options = s:options",
`let g:dpp#_base_path = '${basePath}'`,
`let &runtimepath = '${newRuntimepath}'`,
];
Expand Down Expand Up @@ -220,7 +221,7 @@ export class Dpp {

const cacheFile = `${basePath}/cache_${progname}.vim`;
const cacheLines = [
JSON.stringify([configReturn.plugins, {}]),
JSON.stringify([configReturn.plugins, {}, options]),
];
console.log(cacheFile);
await Deno.writeTextFile(cacheFile, cacheLines.join("\n"));
Expand Down

0 comments on commit 091e55d

Please sign in to comment.