summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/method/initialize.lua2
-rw-r--r--server/src/vm/global.lua7
-rw-r--r--server/src/vm/value.lua4
3 files changed, 11 insertions, 2 deletions
diff --git a/server/src/method/initialize.lua b/server/src/method/initialize.lua
index ba183c5e..e236617c 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/global.lua b/server/src/vm/global.lua
index bb506ce9..b1b32505 100644
--- a/server/src/vm/global.lua
+++ b/server/src/vm/global.lua
@@ -13,9 +13,14 @@ return function (lsp)
global:rawSet(name, value)
end
end
+
+ local _G = global:getChild '_G'
+ global:eachChild(function (k, v)
+ _G:setChild(k, v)
+ end)
end
if lsp then
lsp.globalValue = global
end
- return global
+ return global:rawGet('_G')
end
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index 44e9d1e4..60f0c663 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -151,6 +151,10 @@ function mt:getChild(index, source, mark)
return method:getChild(index, source, mark)
end
+function mt:bindChild(other)
+ self._child = other._child
+end
+
function mt:setMetaTable(metatable)
self._meta = metatable
end