diff --git a/src/utils/config.ts b/src/utils/config.ts index 82b158c..9b93fdc 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -101,7 +101,7 @@ let globalConfig: Config = { export const getConfig = (): Config => globalConfig; export const loadConfig = async (program: Command) => { - configPaths.forEach(async (configPath) => { + for (const configPath of configPaths) { if (fs.existsSync(configPath)) { let config: Config; try { @@ -122,13 +122,13 @@ export const loadConfig = async (program: Command) => { dismissSuggestions: config?.bindings?.dismissSuggestions ?? globalConfig.bindings.dismissSuggestions, }, specs: { - path: [...(config?.specs?.path ?? []), ...(config?.specs?.path ?? [])], + path: [...(config?.specs?.path ?? [])], }, useNerdFont: config?.useNerdFont ?? false, }; } - }); - globalConfig.specs = { path: [path.join(os.homedir(), ".fig", "autocomplete", "build"), ...(globalConfig.specs?.path ?? [])].map((p) => `file:\\${p}`) }; + } + globalConfig.specs = { path: [path.join(os.homedir(), ".fig", "autocomplete", "build"), ...(globalConfig.specs?.path ?? [])] }; }; export const deleteCacheFolder = (): void => {