File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,13 @@ let actionPickerParams = { ...defaultActionPickerParams };
3636const itemPickerParamsMap = new Map < string , ItemPickerParams > ( ) ;
3737
3838const refineGlobalConfig = buildRefineGlobalConfig ( globalConfig ) ;
39+
3940const refineActionPicker = buildRefineActionPicker ( actionPickerParams ) ;
41+
4042const defineItemPickerFromSource = buildDefineItemPickerFromSource (
4143 itemPickerParamsMap ,
4244) ;
45+
4346const defineItemPickerFromCurator = buildDefineItemPickerFromCurator (
4447 itemPickerParamsMap ,
4548) ;
@@ -52,8 +55,8 @@ function reset(): void {
5255
5356export async function loadUserConfig (
5457 denops : Denops ,
55- path : string ,
56- { suffix } : { suffix ?: string } = { } ,
58+ path : URL ,
59+ { reload = false } : { reload ?: boolean } = { } ,
5760) : Promise < void > {
5861 const ctx = {
5962 denops,
@@ -62,8 +65,9 @@ export async function loadUserConfig(
6265 refineActionPicker,
6366 refineGlobalConfig,
6467 } ;
68+ const suffix = reload ? `#${ performance . now ( ) } ` : "" ;
6569 try {
66- const { main } = await import ( `${ path } ${ suffix ?? "" } ` ) ;
70+ const { main } = await import ( `${ path . href } ${ suffix } ` ) ;
6771 reset ( ) ;
6872 await main ( ctx ) ;
6973 } catch ( err ) {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import * as opt from "jsr:@denops/std@^7.3.2/option";
33import { collect } from "jsr:@denops/std@^7.3.2/batch" ;
44import { ensurePromise } from "jsr:@core/asyncutil@^1.2.0/ensure-promise" ;
55import { as , assert , ensure , is } from "jsr:@core/unknownutil@^4.3.0" ;
6+ import { toFileUrl } from "jsr:@std/path@^1.0.8/to-file-url" ;
67import type { Size } from "jsr:@vim-fall/core@^0.2.1/coordinator" ;
78import type { DetailUnit } from "jsr:@vim-fall/core@^0.2.1/item" ;
89
@@ -98,8 +99,7 @@ async function init(
9899 console . error ( `Cache reload failed: ${ path } \n${ decoder . decode ( stderr ) } ` ) ;
99100 }
100101 }
101- const suffix = reload ? `#${ performance . now ( ) } ` : undefined ;
102- return ( initialized = loadUserConfig ( denops , path , { suffix } ) ) ;
102+ return ( initialized = loadUserConfig ( denops , toFileUrl ( path ) , { reload } ) ) ;
103103}
104104
105105async function startPicker (
You can’t perform that action at this time.
0 commit comments