diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/files.lua | 3 | ||||
-rw-r--r-- | script/provider/provider.lua | 3 | ||||
-rw-r--r-- | script/workspace/loading.lua | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/script/files.lua b/script/files.lua index 0154bb50..f67631f0 100644 --- a/script/files.lua +++ b/script/files.lua @@ -31,6 +31,8 @@ local pub = require 'pub' ---@field diffInfo? table[] ---@field cache table ---@field id integer +---@field state? parser.state +---@field compileCount integer ---@class files ---@field lazyCache? lazy-cacher @@ -274,7 +276,6 @@ function m.setText(uri, text, isTrust, callback) util.saveFile(LOGPATH .. '/diffed.lua', newText) end end - m.getState(uri) log.trace('Set text:', uri, 'takes', os.clock() - clock, 'sec.') --if instance or TEST then diff --git a/script/provider/provider.lua b/script/provider/provider.lua index a01b5d10..488f1a61 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -271,12 +271,13 @@ m.register 'textDocument/didOpen' { end local uri = files.getRealUri(doc.uri) log.debug('didOpen', uri) - workspace.awaitReady(uri) local text = doc.text files.setText(uri, text, true, function (file) file.version = doc.version end) files.open(uri) + workspace.awaitReady(uri) + files.getState(uri) end } diff --git a/script/workspace/loading.lua b/script/workspace/loading.lua index 28c76561..9344949c 100644 --- a/script/workspace/loading.lua +++ b/script/workspace/loading.lua @@ -99,6 +99,7 @@ function mt:loadFile(uri, libraryUri) -- self._sets[#self._sets+1] = waker --end) files.setText(uri, content, false) + files.getState(uri) if not self._cache[uri] then files.addRef(uri) end |