Skip to content

Commit 73f830f

Browse files
committed
update config
1 parent 0ca5630 commit 73f830f

File tree

9 files changed

+32
-15
lines changed

9 files changed

+32
-15
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# changelog
22

3+
## 1.18.0
4+
* `CHG` `Windows`: dose not provide `ucrt` any more
5+
* `CHG` `Lua.workspace.library`: use `path[]` instead of `<path, true>`
6+
* `FIX` missed syntax error `local a <const>= 1`
7+
38
## 1.17.4
49
`2021-3-4`
510
* `FIX` [#437](https://github.com/sumneko/lua-language-server/issues/437) again

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@
10061006
"Lua.runtime.special": {
10071007
"markdownDescription": "%config.runtime.special%",
10081008
"patternProperties": {
1009-
"": {
1009+
".*": {
10101010
"default": "require",
10111011
"enum": [
10121012
"_G",
@@ -1087,9 +1087,12 @@
10871087
"type": "boolean"
10881088
},
10891089
"Lua.workspace.library": {
1090+
"items": {
1091+
"type": "string"
1092+
},
10901093
"markdownDescription": "%config.workspace.library%",
10911094
"scope": "resource",
1092-
"type": "object"
1095+
"type": "array"
10931096
},
10941097
"Lua.workspace.maxPreload": {
10951098
"default": 1000,

package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"config.window.statusBar": "Show extension status in status bar.",
5050
"config.workspace.ignoreDir": "Ignored files and directories (Use `.gitignore` grammar).\n",
5151
"config.workspace.ignoreSubmodules": "Ignore submodules.",
52-
"config.workspace.library": "Load external library.\nThis feature can load external Lua files, which can be used for definition, automatic completion and other functions. Note that the language server does not monitor changes in external files and needs to restart if the external files are modified.\n",
52+
"config.workspace.library": "The directory path of the external function library.\nThe language service will additionally load the lua files in these directories, even if they are not in the current working spcae, for definition, completion and other features.\n",
5353
"config.workspace.maxPreload": "Max preloaded files.",
5454
"config.workspace.preloadFileSize": "Skip files larger than this value (KB) when preloading.",
5555
"config.workspace.useGitIgnore": "Ignore files list in `.gitignore` .",

package.nls.zh-cn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"config.window.statusBar": "在状态栏显示插件状态。",
5353
"config.workspace.ignoreDir": "忽略的文件与目录(使用 `.gitignore` 语法)。\n",
5454
"config.workspace.ignoreSubmodules": "忽略子模块。",
55-
"config.workspace.library": "加载外部函数库。\n该功能可以加载外部的Lua文件,用于函数定义、自动完成等功能。注意,语言服务不会监视外部文件的变化,如果修改了外部文件需要重启\n",
55+
"config.workspace.library": "外部函数库的目录路径。\n语言服务会额外加载这些目录中的lua文件,即使他们不在当前的工作目录中,用于函数定义、自动完成等功能。\n",
5656
"config.workspace.maxPreload": "最大预加载文件数。",
5757
"config.workspace.preloadFileSize": "预加载时跳过大小大于该值(KB)的文件。",
5858
"config.workspace.useGitIgnore": "忽略 `.gitignore` 中列举的文件。",

package/configuration.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ local config = {
172172
},
173173
["Lua.workspace.library"] = {
174174
scope = 'resource',
175-
type = 'object',
175+
type = "array",
176+
items = {
177+
type = "string"
178+
},
176179
markdownDescription = "%config.workspace.library%"
177180
},
178181
["Lua.completion.enable"] = {

package/nls-zh-cn.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ return {
2424
["config.workspace.maxPreload"] = "最大预加载文件数。",
2525
["config.workspace.preloadFileSize"] = "预加载时跳过大小大于该值(KB)的文件。",
2626
["config.workspace.library"] = [[
27-
加载外部函数库
28-
该功能可以加载外部的Lua文件,用于函数定义、自动完成等功能。注意,语言服务不会监视外部文件的变化,如果修改了外部文件需要重启
27+
外部函数库的目录路径
28+
语言服务会额外加载这些目录中的lua文件,即使他们不在当前的工作目录中,用于函数定义、自动完成等功能。
2929
]],
3030
['config.completion.enable'] = '启用自动完成。',
3131
['config.completion.callSnippet'] = '显示函数调用片段。',

package/nls.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The following example shows that 'include' is treated as' require '.
2424
["config.workspace.maxPreload"] = "Max preloaded files.",
2525
["config.workspace.preloadFileSize"] = "Skip files larger than this value (KB) when preloading.",
2626
["config.workspace.library"] = [[
27-
Load external library.
28-
This feature can load external Lua files, which can be used for definition, automatic completion and other functions. Note that the language server does not monitor changes in external files and needs to restart if the external files are modified.
27+
The directory path of the external function library.
28+
The language service will additionally load the lua files in these directories, even if they are not in the current working spcae, for definition, completion and other features.
2929
]],
3030
['config.completion.enable'] = 'Enable completion.',
3131
['config.completion.callSnippet'] = 'Shows function call snippets.',

setting/schema-zh-cn.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@
990990
"Lua.runtime.special": {
991991
"markdownDescription": "将自定义全局变量视为一些特殊的内置变量,语言服务将提供特殊的支持。\n下面这个例子表示将 `include` 视为 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
992992
"patternProperties": {
993-
"": {
993+
".*": {
994994
"default": "require",
995995
"enum": [
996996
"_G",
@@ -1071,9 +1071,12 @@
10711071
"type": "boolean"
10721072
},
10731073
"Lua.workspace.library": {
1074-
"markdownDescription": "加载外部函数库。\n该功能可以加载外部的Lua文件,用于函数定义、自动完成等功能。注意,语言服务不会监视外部文件的变化,如果修改了外部文件需要重启。\n",
1074+
"items": {
1075+
"type": "string"
1076+
},
1077+
"markdownDescription": "外部函数库的目录路径。\n语言服务会额外加载这些目录中的lua文件,即使他们不在当前的工作目录中,用于函数定义、自动完成等功能。\n",
10751078
"scope": "resource",
1076-
"type": "object"
1079+
"type": "array"
10771080
},
10781081
"Lua.workspace.maxPreload": {
10791082
"default": 1000,

setting/schema.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@
990990
"Lua.runtime.special": {
991991
"markdownDescription": "The custom global variables are regarded as some special built-in variables, and the language server will provide special support\nThe following example shows that 'include' is treated as' require '.\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
992992
"patternProperties": {
993-
"": {
993+
".*": {
994994
"default": "require",
995995
"enum": [
996996
"_G",
@@ -1071,9 +1071,12 @@
10711071
"type": "boolean"
10721072
},
10731073
"Lua.workspace.library": {
1074-
"markdownDescription": "Load external library.\nThis feature can load external Lua files, which can be used for definition, automatic completion and other functions. Note that the language server does not monitor changes in external files and needs to restart if the external files are modified.\n",
1074+
"items": {
1075+
"type": "string"
1076+
},
1077+
"markdownDescription": "The directory path of the external function library.\nThe language service will additionally load the lua files in these directories, even if they are not in the current working spcae, for definition, completion and other features.\n",
10751078
"scope": "resource",
1076-
"type": "object"
1079+
"type": "array"
10771080
},
10781081
"Lua.workspace.maxPreload": {
10791082
"default": 1000,

0 commit comments

Comments
 (0)