Skip to content

Commit becf15e

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents e4df77f + 4f04a44 commit becf15e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2474
-1608
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
matrix:
2222
include:
2323
- { os: ubuntu-18.04, target: linux, platform: linux-x64 }
24+
- { os: ubuntu-18.04, target: linux, platform: linux-arm64 }
2425
- { os: macos-11, target: darwin, platform: darwin-x64 }
2526
- { os: macos-11, target: darwin, platform: darwin-arm64 }
2627
- { os: windows-latest, target: windows, platform: win32-ia32 }

changelog.md

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

33
## 2.5.7
4+
* `NEW` supports multi-workspace in server side, for developers of language clients, please [read here](https://github.com/sumneko/lua-language-server/wiki/Multi-workspace-supports) to learn more.
5+
* `NEW` setting: `Lua.hint.arrayIndex`
6+
* `CHG` diagnostic: smoother
7+
* `CHG` completion: can be triggered in `LuaDoc` and strings
48
* `FIX` [#879](https://github.com/sumneko/lua-language-server/issues/879)
59
* `FIX` [#884](https://github.com/sumneko/lua-language-server/issues/884)
610
* `FIX` [#885](https://github.com/sumneko/lua-language-server/issues/885)

locale/en-us/meta.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---@diagnostic disable: undefined-global, lowercase-global
2+
13
-- basic
24
arg = 'Command-line arguments of Lua Standalone.'
35
assert = 'Raises an error if the value of its argument v is false (i.e., `nil` or `false`); otherwise, returns all its arguments. In case of error, `message` is the error object; when absent, it defaults to `"assertion failed!"`'

locale/en-us/script.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,9 @@ WINDOW_SETTING_WS_DIAGNOSTIC = 'You can delay or disable workspace diagnosti
233233
WINDOW_DONT_SHOW_AGAIN = "Don't show again"
234234
WINDOW_DELAY_WS_DIAGNOSTIC = 'Idle time diagnosis (delay {} seconds)'
235235
WINDOW_DISABLE_DIAGNOSTIC = 'Disable workspace diagnostics'
236-
WINDOW_LUA_STATUS = [[
237-
Workspace : {ws}
238-
Cached files: {ast}/{max}
239-
Memory usage: {mem:.f}M
240-
]]
236+
WINDOW_LUA_STATUS_WORKSPACE = 'Workspace : {}'
237+
WINDOW_LUA_STATUS_CACHED_FILES = 'Cached files: {ast}/{max}'
238+
WINDOW_LUA_STATUS_MEMORY_COUNT = 'Memory usage: {mem:.f}M'
241239
WINDOW_APPLY_SETTING = 'Apply setting'
242240
WINDOW_CHECK_SEMANTIC = 'If you are using the color theme in the market, you may need to modify `editor.semanticHighlighting.enabled` to `true` to make semantic tokens take effect.'
243241
WINDOW_TELEMETRY_HINT = 'Please allow sending anonymous usage data and error reports to help us further improve this extension. Read our privacy policy [here](https://github.com/sumneko/lua-language-server/wiki/Privacy-Policy) .'

locale/en-us/setting.lua

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---@diagnostic disable: undefined-global
2+
3+
config.runtime.version = "Lua runtime version."
4+
config.runtime.path = [[
5+
When using `require`, how to find the file based on the input name.
6+
Setting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.
7+
if `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.
8+
If you want to load files outside the workspace, you need to set `Lua.workspace.library` first.
9+
]]
10+
config.runtime.pathStrict = 'When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.'
11+
config.runtime.special = [[The custom global variables are regarded as some special built-in variables, and the language server will provide special support
12+
The following example shows that 'include' is treated as' require '.
13+
```json
14+
"Lua.runtime.special" : {
15+
"include" : "require"
16+
}
17+
```
18+
]]
19+
config.runtime.unicodeName = "Allows Unicode characters in name."
20+
config.runtime.nonstandardSymbol = "Supports non-standard symbols. Make sure that your runtime environment supports these symbols."
21+
config.runtime.plugin = "Plugin path. Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/Plugin) to learn more."
22+
config.runtime.fileEncoding = "File encoding. The `ansi` option is only available under the `Windows` platform."
23+
config.runtime.builtin = [[
24+
Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.
25+
26+
* `default`: Indicates that the library will be enabled or disabled according to the runtime version
27+
* `enable`: always enable
28+
* `disable`: always disable
29+
]]
30+
config.diagnostics.enable = "Enable diagnostics."
31+
config.diagnostics.disable = "Disabled diagnostic (Use code in hover brackets)."
32+
config.diagnostics.globals = "Defined global variables."
33+
config.diagnostics.severity = "Modified diagnostic severity."
34+
config.diagnostics.neededFileStatus = [[
35+
* Opened: only diagnose opened files
36+
* Any: diagnose all files
37+
* Disable: disable this diagnostic
38+
]]
39+
config.diagnostics.workspaceDelay = "Latency (milliseconds) for workspace diagnostics. When you start the workspace, or edit any file, the entire workspace will be re-diagnosed in the background. Set to negative to disable workspace diagnostics."
40+
config.diagnostics.workspaceRate = "Workspace diagnostics run rate (%). Decreasing this value reduces CPU usage, but also reduces the speed of workspace diagnostics. The diagnosis of the file you are currently editing is always done at full speed and is not affected by this setting."
41+
config.diagnostics.libraryFiles = "How to diagnose files loaded via `Lua.workspace.library`."
42+
config.diagnostics.ignoredFiles = "How to diagnose ignored files."
43+
config.diagnostics.files.Enable = "Always diagnose these files."
44+
config.diagnostics.files.Opened = "Only when these files are opened will it be diagnosed."
45+
config.diagnostics.files.Disable = "These files are not diagnosed."
46+
config.workspace.ignoreDir = "Ignored files and directories (Use `.gitignore` grammar)."-- .. example.ignoreDir,
47+
config.workspace.ignoreSubmodules = "Ignore submodules."
48+
config.workspace.useGitIgnore = "Ignore files list in `.gitignore` ."
49+
config.workspace.maxPreload = "Max preloaded files."
50+
config.workspace.preloadFileSize = "Skip files larger than this value (KB) when preloading."
51+
config.workspace.library = "In addition to the current workspace, which directories will load files from. The files in these directories will be treated as externally provided code libraries, and some features (such as renaming fields) will not modify these files."
52+
config.workspace.checkThirdParty = [[
53+
Automatic detection and adaptation of third-party libraries, currently supported libraries are:
54+
55+
* OpenResty
56+
* Cocos4.0
57+
* LÖVE
58+
* LÖVR
59+
* skynet
60+
* Jass
61+
]]
62+
config.workspace.userThirdParty = 'Add private third-party library configuration file paths here, please refer to the built-in [configuration file path](https://github.com/sumneko/lua-language-server/tree/master/meta/3rd)'
63+
config.completion.enable = 'Enable completion.'
64+
config.completion.callSnippet = 'Shows function call snippets.'
65+
config.completion.callSnippet.Disable = "Only shows `function name`."
66+
config.completion.callSnippet.Both = "Shows `function name` and `call snippet`."
67+
config.completion.callSnippet.Replace = "Only shows `call snippet.`"
68+
config.completion.keywordSnippet = 'Shows keyword syntax snippets.'
69+
config.completion.keywordSnippet.Disable = "Only shows `keyword`."
70+
config.completion.keywordSnippet.Both = "Shows `keyword` and `syntax snippet`."
71+
config.completion.keywordSnippet.Replace = "Only shows `syntax snippet`."
72+
config.completion.displayContext = "Previewing the relevant code snippet of the suggestion may help you understand the usage of the suggestion. The number set indicates the number of intercepted lines in the code fragment. If it is set to `0`, this feature can be disabled."
73+
config.completion.workspaceWord = "Whether the displayed context word contains the content of other files in the workspace."
74+
config.completion.showWord = "Show contextual words in suggestions."
75+
config.completion.showWord.Enable = "Always show context words in suggestions."
76+
config.completion.showWord.Fallback = "Contextual words are only displayed when suggestions based on semantics cannot be provided."
77+
config.completion.showWord.Disable = "Do not display context words."
78+
config.completion.autoRequire = "When the input looks like a file name, automatically `require` this file."
79+
config.completion.showParams = "Display parameters in completion list. When the function has multiple definitions, they will be displayed separately."
80+
config.completion.requireSeparator = "The separator used when `require`."
81+
config.completion.postfix = "The symbol used to trigger the postfix suggestion."
82+
config.color.mode = "Color mode."
83+
config.color.mode.Semantic = "Semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect."
84+
config.color.mode.SemanticEnhanced = "Enhanced semantic color. Like `Semantic`, but with additional analysis which might be more computationally expensive."
85+
config.color.mode.Grammar = "Grammar color."
86+
config.signatureHelp.enable = "Enable signature help."
87+
config.hover.enable = "Enable hover."
88+
config.hover.viewString = "Hover to view the contents of a string (only if the literal contains an escape character)."
89+
config.hover.viewStringMax = "The maximum length of a hover to view the contents of a string."
90+
config.hover.viewNumber = "Hover to view numeric content (only if literal is not decimal)."
91+
config.hover.fieldInfer = "When hovering to view a table, type infer will be performed for each field. When the accumulated time of type infer reaches the set value (MS), the type infer of subsequent fields will be skipped."
92+
config.hover.previewFields = "When hovering to view a table, limits the maximum number of previews for fields."
93+
config.hover.enumsLimit = "When the value corresponds to multiple types, limit the number of types displaying."
94+
config.develop.enable = 'Developer mode. Do not enable, performance will be affected.'
95+
config.develop.debuggerPort = 'Listen port of debugger.'
96+
config.develop.debuggerWait = 'Suspend before debugger connects.'
97+
config.intelliSense.searchDepth = 'Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.'
98+
config.intelliSense.fastGlobal = 'In the global variable completion, and view `_G` suspension prompt. This will slightly reduce the accuracy of type speculation, but it will have a significant performance improvement for projects that use a lot of global variables.'
99+
config.window.statusBar = 'Show extension status in status bar.'
100+
config.window.progressBar = 'Show progress bar in status bar.'
101+
config.hint.enable = 'Enabel hint.'
102+
config.hint.paramType = 'Show type hints at the parameter of the function.'
103+
config.hint.setType = 'Show hints of type at assignment operation.'
104+
config.hint.paramName = 'Show hints of parameter name at the function call.'
105+
config.hint.paramName.All = 'All types of parameters are shown.'
106+
config.hint.paramName.Literal = 'Only literal type parameters are shown.'
107+
config.hint.paramName.Disable = 'Disable parameter hints.'
108+
config.hint.arrayIndex = 'Show hints of array index when constructing a table.'
109+
config.hint.arrayIndex.Enable = 'Show hints in all tables.'
110+
config.hint.arrayIndex.Auto = 'Show hints only when the table is greater than 3 items, or the table is a mixed table.'
111+
config.hint.arrayIndex.Disable = 'Disable hints of array index.'
112+
config.telemetry.enable = [[
113+
Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://github.com/sumneko/lua-language-server/wiki/Privacy-Policy).
114+
]]
115+
config.misc.parameters = '[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.'
116+
config.IntelliSense.traceLocalSet = 'Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
117+
config.IntelliSense.traceReturn = 'Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
118+
config.IntelliSense.traceBeSetted = 'Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'
119+
config.IntelliSense.traceFieldInject = 'Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.'

locale/pt-br/meta.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---@diagnostic disable: undefined-global, lowercase-global
2+
13
-- basic
24
arg = 'Argumentos de inicialização para a versão standalone da linguagem Lua.'
35
assert = 'Emite um erro se o valor de seu argumento v for falso (i.e., `nil` ou `false`); caso contrário, devolve todos os seus argumentos. Em caso de erro, `message` é o objeto de erro que, quando ausente, por padrão é `"assertion failed!"`'

locale/pt-br/script.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,9 @@ WINDOW_SETTING_WS_DIAGNOSTIC = 'Você pode atrasar ou desativar os diagnóst
229229
WINDOW_DONT_SHOW_AGAIN = 'Não mostre novamente'
230230
WINDOW_DELAY_WS_DIAGNOSTIC = 'Diagnóstico de tempo ocioso (atraso de {} segundos)'
231231
WINDOW_DISABLE_DIAGNOSTIC = 'Desativa diagnósticos do espaço de trabalho'
232-
WINDOW_LUA_STATUS = [[
233-
Área de trabalho : {ws}
234-
Arquivos em cache: {ast}/{max}
235-
Uso de memória: {mem:.f}M
236-
]]
232+
WINDOW_LUA_STATUS_WORKSPACE = 'Área de trabalho : {}'
233+
WINDOW_LUA_STATUS_CACHED_FILES = 'Arquivos em cache: {ast}/{max}'
234+
WINDOW_LUA_STATUS_MEMORY_COUNT = 'Uso de memória : {mem:.f}M'
237235
WINDOW_APPLY_SETTING = 'Aplicar configuração'
238236
WINDOW_CHECK_SEMANTIC = 'Se você estiver usando o tema de cores do market, talvez seja necessário modificar `editor.semanticHighlighting.enabled` para `true` para fazer com tokens semânticas sejam habilitados.'
239237
WINDOW_TELEMETRY_HINT = 'Por favor, permita o envio de dados de uso e relatórios de erro anônimos para nos ajudar a melhorar ainda mais essa extensão. Leia nossa política de privacidade [aqui](https://github.com/sumneko/lua-language-server/wiki/Privacy-Policy) .'

locale/zh-cn/meta.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---@diagnostic disable: undefined-global, lowercase-global
2+
13
-- basic
24
arg = '独立版Lua的启动参数。'
35
assert = '如果其参数 `v` 的值为假(`nil` 或 `false`), 它就调用 $error; 否则,返回所有的参数。 在错误情况时, `message` 指那个错误对象; 如果不提供这个参数,参数默认为 `"assertion failed!"` 。'

locale/zh-cn/script.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ WINDOW_SETTING_WS_DIAGNOSTIC = '你可以在设置中延迟或禁用工作
232232
WINDOW_DONT_SHOW_AGAIN = '不再提示'
233233
WINDOW_DELAY_WS_DIAGNOSTIC = '空闲时诊断(延迟{}秒)'
234234
WINDOW_DISABLE_DIAGNOSTIC = '禁用工作区诊断'
235-
WINDOW_LUA_STATUS = [[
236-
工作区:{ws}
237-
已缓存文件:{ast}/{max}
238-
内存占用:{mem:.f}M
239-
]]
235+
WINDOW_LUA_STATUS_WORKSPACE = '工作区:{}'
236+
WINDOW_LUA_STATUS_CACHED_FILES = '已缓存文件:{ast}/{max}'
237+
WINDOW_LUA_STATUS_MEMORY_COUNT = '内存占用:{mem:.f}M'
240238
WINDOW_APPLY_SETTING = '应用设置'
241239
WINDOW_CHECK_SEMANTIC = '如果你正在使用市场中的颜色主题,你可能需要同时修改 `editor.semanticHighlighting.enabled` 选项为 `true` 才会使语义着色生效。'
242240
WINDOW_TELEMETRY_HINT = '请允许发送匿名的使用数据与错误报告,帮助我们进一步完善此插件。在[此处](https://github.com/sumneko/lua-language-server/wiki/%E9%9A%90%E7%A7%81%E5%A3%B0%E6%98%8E)阅读我们的隐私声明。'

0 commit comments

Comments
 (0)