diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-18 17:01:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-18 17:01:10 +0800 |
commit | e238ca2634dd5276a910967712773a0bc3eb7a02 (patch) | |
tree | 134961c2e182b8e7ce222c92fad585787518a9f1 | |
parent | 357e62b68d67c4218d95f6bee937e6d5e206d752 (diff) | |
download | lua-language-server-e238ca2634dd5276a910967712773a0bc3eb7a02.zip |
修正无法获取库函数child的bug
-rw-r--r-- | server/src/method/initialize.lua | 2 | ||||
-rw-r--r-- | server/src/vm/library.lua | 1 | ||||
-rw-r--r-- | server/test/completion/init.lua | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/server/src/method/initialize.lua b/server/src/method/initialize.lua index e236617c..ba183c5e 100644 --- a/server/src/method/initialize.lua +++ b/server/src/method/initialize.lua @@ -22,7 +22,7 @@ return function (lsp) -- 支持“重命名” renameProvider = true, -- 支持“大纲” - --documentSymbolProvider = true, + documentSymbolProvider = true, -- 支持“签名帮助” signatureHelpProvider = { triggerCharacters = { '(', ',' }, diff --git a/server/src/vm/library.lua b/server/src/vm/library.lua index 8f034229..167ac726 100644 --- a/server/src/vm/library.lua +++ b/server/src/vm/library.lua @@ -54,6 +54,7 @@ function buildLibValue(lib) for fName, fLib in pairs(lib.child) do local fValue = buildLibValue(fLib) value:rawSet(fName, fValue) + value:addInfo('set child', sourceMgr.dummy(), fName) end end diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index 59189921..fec6f105 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -330,6 +330,9 @@ TEST [[ TEST 'local s = "a:@"' (nil) +TEST 'debug.@' +(EXISTS) + TEST [[ local xxxx = { xxyy = 1, |