diff options
Diffstat (limited to 'script/workspace/require-path.lua')
-rw-r--r-- | script/workspace/require-path.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua index 1507183c..6553212d 100644 --- a/script/workspace/require-path.lua +++ b/script/workspace/require-path.lua @@ -5,6 +5,7 @@ local workspace = require "workspace" local config = require 'config' local scope = require 'workspace.scope' local util = require 'utility' +local plugin = require 'plugin' ---@class require-path local m = {} @@ -181,6 +182,11 @@ function mt:searchUrisByRequireName(name) local searcherMap = {} local excludes = {} + local pluginSuccess, pluginResults = plugin.dispatch('ResolveRequire', self.scp.uri, name) + if pluginSuccess and pluginResults ~= nil then + return pluginResults + end + for uri in files.eachFile(self.scp.uri) do if vm.isMetaFileRequireable(uri) then local metaName = vm.getMetaName(uri) |