summaryrefslogtreecommitdiff
path: root/script/progress.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-10 03:49:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-10 03:49:54 +0800
commitae07ea940e77cc23eba78e717a09d99233841620 (patch)
tree3049b9bcd0ace79f7532df301e228cc9fb6040e9 /script/progress.lua
parent4e0a890060aea1eb54b14b3a77cba8fc42ceeebb (diff)
downloadlua-language-server-ae07ea940e77cc23eba78e717a09d99233841620.zip
cancel searching reference
Diffstat (limited to 'script/progress.lua')
-rw-r--r--script/progress.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/script/progress.lua b/script/progress.lua
index 5388ef6e..b43ed05b 100644
--- a/script/progress.lua
+++ b/script/progress.lua
@@ -11,7 +11,7 @@ local m = {}
m.map = {}
---@class progress
----@field _scp scope
+---@field _uri uri
local mt = {}
mt.__index = mt
mt._token = nil
@@ -85,7 +85,7 @@ function mt:_update()
and self._clock + self._delay <= time.time() then
self._updated = time.time()
self._dirty = false
- if not config.get(self._scp.uri, 'Lua.window.progressBar') then
+ if not config.get(self._uri, 'Lua.window.progressBar') then
return
end
proto.request('window/workDoneProgress/create', {
@@ -108,7 +108,7 @@ function mt:_update()
if not self._showed then
return
end
- if not config.get(self._scp.uri, 'Lua.window.progressBar') then
+ if not config.get(self._uri, 'Lua.window.progressBar') then
self:remove()
return
end
@@ -145,16 +145,16 @@ function m.update()
end
---创建一个进度条
----@param scp scope
+---@param uri uri
---@param title string # 标题
---@param delay number # 至少经过这么久之后才会显示出来
-function m.create(scp, title, delay)
+function m.create(uri, title, delay)
local prog = setmetatable({
_token = nextToken(),
_title = title,
_clock = time.time(),
_delay = delay * 1000,
- _scp = scp,
+ _uri = uri,
}, mt)
m.map[prog._token] = prog