summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-30 20:02:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-30 20:02:56 +0800
commit4b842d088b38aea475b4bbdc411bed654c9e8228 (patch)
tree41ad35fcf1df1a105bbbecf643088cc8ec4500ed /script/files.lua
parent1c6a36528c5b5094353ee02796069542e33a71c3 (diff)
downloadlua-language-server-4b842d088b38aea475b4bbdc411bed654c9e8228.zip
update hint by event
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/script/files.lua b/script/files.lua
index 17b0e290..88b1fe32 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -381,11 +381,12 @@ function m.getAst(uri)
end
---设置文件的当前可见范围
----@param uri uri
----@param ranges range[]
-function m.setVisibles(uri, ranges)
- uri = m.getUri(uri)
+---@param originUri uri
+---@param ranges range[]
+function m.setVisibles(originUri, ranges)
+ local uri = m.getUri(originUri)
m.visible[uri] = ranges
+ m.onWatch('updateVisible', originUri)
end
---获取文件的当前可见范围