summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-24 15:54:47 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-24 15:54:47 +0800
commit1025cce98d50c31c0f5ce4bcc90ec106530695f0 (patch)
treed54d93ad36819f849864fa1ea40d99dcd6216fbd /server/test
parent26be287d51ba1ce10e6d473282ae656e85c50f27 (diff)
downloadlua-language-server-1025cce98d50c31c0f5ce4bcc90ec106530695f0.zip
打开library功能
Diffstat (limited to 'server/test')
-rw-r--r--server/test/build_package.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/test/build_package.lua b/server/test/build_package.lua
index a91d702f..44375e6f 100644
--- a/server/test/build_package.lua
+++ b/server/test/build_package.lua
@@ -111,11 +111,11 @@ local package = {
default = 100,
markdownDescription = "%config.workspace.preloadFileSize%"
},
- --["Lua.workspace.library"] = {
- -- scope = 'resource',
- -- type = 'object',
- -- markdownDescription = "%config.workspace.library%"
- --}
+ ["Lua.workspace.library"] = {
+ scope = 'resource',
+ type = 'object',
+ markdownDescription = "%config.workspace.library%"
+ }
}
},
grammars = {
@@ -231,7 +231,8 @@ io.save(ROOT:parent_path() / 'package.nls.zh-cn.json', json.encode {
["config.workspace.maxPreload"] = "最大预加载文件数。",
["config.workspace.preloadFileSize"] = "预加载时跳过大小大于该值(KB)的文件。",
["config.workspace.library"] = [[
-加载的外部函数库。
+加载外部函数库。
+该功能可以加载外部的Lua文件,用于函数定义、自动完成等功能。注意,语言服务不会监视外部文件的变化,如果修改了外部文件需要重启。
下面这个例子表示加载`C:/lua`中的所有文件,以及加载`../lib`中的`.txt`与`.lua`文件,但不加载`../lib/temp`中的`.txt`文件。加载的文件最终会受文件关联的影响,因此需要设置`.txt`文件关联`lua`后`*.txt`才有意义。
]] .. example.library,
})