From a5c7953bf41a944906c39921d2d8bb397b828cd8 Mon Sep 17 00:00:00 2001 From: kuuote Date: Sun, 23 Jun 2024 15:07:15 +0900 Subject: [PATCH] Fix all plugins are always available --- denops/dpp/dpp.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/denops/dpp/dpp.ts b/denops/dpp/dpp.ts index b9541c4..5327317 100644 --- a/denops/dpp/dpp.ts +++ b/denops/dpp/dpp.ts @@ -181,11 +181,14 @@ export class Dpp { // Add plugins runtimepath const depends = new Set(); - const availablePlugins = Object.values(recordPlugins).filter(async ( - plugin, - ) => - plugin.path && await isDirectory(plugin.path) && await checkIf(plugin) - ); + const availablePlugins = []; + for (const plugin of Object.values(recordPlugins)) { + if ( + plugin.path && !await isDirectory(plugin.path) && await checkIf(plugin) + ) { + availablePlugins.push(plugin); + } + } const nonLazyPlugins = availablePlugins.filter((plugin) => !plugin.lazy); const hookSources = []; for (const plugin of nonLazyPlugins) {