summaryrefslogtreecommitdiff
path: root/script/method/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-07-21 16:19:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-07-21 16:19:50 +0800
commit7cc24573d94b343a23ed2e0f9c00e4840dbbdd35 (patch)
treeb646c594fb6894b9866145c9f562dbd771bd1e7b /script/method/workspace
parent403256cc7e2683d018f925b58864032ce753584e (diff)
downloadlua-language-server-7cc24573d94b343a23ed2e0f9c00e4840dbbdd35.zip
现在的实现不太好计算parent
Diffstat (limited to 'script/method/workspace')
-rw-r--r--script/method/workspace/symbol.lua18
1 files changed, 0 insertions, 18 deletions
diff --git a/script/method/workspace/symbol.lua b/script/method/workspace/symbol.lua
index 70755ee0..11e15296 100644
--- a/script/method/workspace/symbol.lua
+++ b/script/method/workspace/symbol.lua
@@ -46,28 +46,11 @@ local function convertRange(lines, range)
return result
end
-local function getParentName(source)
- local parentValue = source:get 'parent'
- if not parentValue then
- return
- end
- local pSource = parentValue:getSource()
- if not pSource then
- return
- end
- local name = pSource[1]
- if type(name) ~= 'string' or name == '' then
- return
- end
- return name
-end
-
local function collect(results, source, uri, lines)
if source:action() ~= 'set' then
return
end
local kind = SymbolKind.Variable
- local contain = getParentName(source)
local value = source:bindValue()
if value and value:getFunction() then
kind = SymbolKind.Function
@@ -81,7 +64,6 @@ local function collect(results, source, uri, lines)
results[#results+1] = {
name = source[1],
kind = kind,
- containerName = contain,
location = {
uri = uri,
range = convertRange(lines, source),