summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/files.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/files.lua b/script/files.lua
index 0c2c2874..dc39a446 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -7,12 +7,10 @@ local proto = require 'proto'
local lang = require 'language'
local await = require 'await'
local timer = require 'timer'
-local plugin = require 'plugin'
local util = require 'utility'
local guide = require 'parser.guide'
local smerger = require 'string-merger'
local progress = require "progress"
-local client = require 'client'
local unicode
@@ -98,6 +96,7 @@ function m.exists(uri)
end
local function pluginOnSetText(file, text)
+ local plugin = require 'plugin'
file._diffInfo = nil
local suc, result = plugin.dispatch('OnSetText', file.uri, text)
if not suc then
@@ -409,7 +408,8 @@ function m.eachDll()
end
function m.compileState(uri, text)
- local ws = require 'workspace'
+ local ws = require 'workspace'
+ local client = require 'client'
if not m.isOpen(uri)
and not m.isLibrary(uri)
and #text >= config.get 'Lua.workspace.preloadFileSize' * 1000 then