diff options
Diffstat (limited to 'script/plugin.lua')
-rw-r--r-- | script/plugin.lua | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/script/plugin.lua b/script/plugin.lua index 88c4578f..0914c0c0 100644 --- a/script/plugin.lua +++ b/script/plugin.lua @@ -43,13 +43,6 @@ function m.isReady() return m.interface ~= nil end -local function resetFiles() - local files = require 'files' - for uri in files.eachFile() do - files.resetText(uri) - end -end - ---@async local function checkTrustLoad() local filePath = LOGPATH .. '/trusted' @@ -75,7 +68,8 @@ local function checkTrustLoad() return true end -function m.init() +---@param scp scope +function m.init(scp) if m.hasInited then return end @@ -84,7 +78,7 @@ function m.init() local ws = require 'workspace' m.interface = {} - local pluginPath = ws.getAbsolutePath(config.get(nil, 'Lua.runtime.plugin')) + local pluginPath = ws.getAbsolutePath(scp.uri, config.get(scp.uri, 'Lua.runtime.plugin')) log.info('plugin path:', pluginPath) if not pluginPath then return @@ -110,7 +104,7 @@ function m.init() return end - resetFiles() + ws.resetFiles(scp) end) end |