diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-09 02:33:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-09 02:33:17 +0800 |
commit | af4e3094bd5592d2e9d6a769ef1d7a1660b3e48e (patch) | |
tree | 2ba0f8c655818ca144354e207a70c5e1589b4a64 /script/core | |
parent | 52847c66b6cdf310176056617806867eae23571e (diff) | |
download | lua-language-server-af4e3094bd5592d2e9d6a769ef1d7a1660b3e48e.zip |
update
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/hover/table.lua | 2 | ||||
-rw-r--r-- | script/core/rename.lua | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/script/core/hover/table.lua b/script/core/hover/table.lua index 8f9beefe..31036edd 100644 --- a/script/core/hover/table.lua +++ b/script/core/hover/table.lua @@ -165,7 +165,7 @@ return function (source) for view in infer.getInfer(source):eachView() do if view == 'string' - or vm.isSubType(view, 'string') then + or vm.isSubType(uri, view, 'string') then return nil end end diff --git a/script/core/rename.lua b/script/core/rename.lua index f1ee93c5..ec21e87c 100644 --- a/script/core/rename.lua +++ b/script/core/rename.lua @@ -195,10 +195,11 @@ local function ofGlobal(source, newname, callback) if not global then return end - for _, set in ipairs(global:getSets()) do + local uri = guide.getUri(source) + for _, set in ipairs(global:getSets(uri)) do ofFieldThen(key, set, newname, callback) end - for _, get in ipairs(global:getGets()) do + for _, get in ipairs(global:getGets(uri)) do ofFieldThen(key, get, newname, callback) end end @@ -217,7 +218,8 @@ local function ofDocTypeName(source, newname, callback) if not global then return end - for _, doc in ipairs(global:getSets()) do + local uri = guide.getUri(source) + for _, doc in ipairs(global:getSets(uri)) do if doc.type == 'doc.class' then callback(doc, doc.class.start, doc.class.finish, newname) end @@ -225,7 +227,7 @@ local function ofDocTypeName(source, newname, callback) callback(doc, doc.alias.start, doc.alias.finish, newname) end end - for _, doc in ipairs(global:getGets()) do + for _, doc in ipairs(global:getGets(uri)) do if doc.type == 'doc.type.name' then callback(doc, doc.start, doc.finish, newname) end |