summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--server/locale/en-US/script.lni1
-rw-r--r--server/locale/zh-CN/script.lni1
-rw-r--r--server/src/core/completion.lua3
-rw-r--r--server/src/method/textDocument/signatureHelp.lua4
-rw-r--r--server/test/build_package.lua2
-rw-r--r--server/test/completion/init.lua2
7 files changed, 7 insertions, 8 deletions
diff --git a/package.json b/package.json
index 687cc0e3..00d01514 100644
--- a/package.json
+++ b/package.json
@@ -306,5 +306,5 @@
"scripts": {
"vscode:prepublish": "cd client && npm run update-vscode && cd .."
},
- "version": "0.10.1"
+ "version": "0.10.2"
} \ No newline at end of file
diff --git a/server/locale/en-US/script.lni b/server/locale/en-US/script.lni
index f56b8024..39256be4 100644
--- a/server/locale/en-US/script.lni
+++ b/server/locale/en-US/script.lni
@@ -69,6 +69,7 @@ HOVER_DOCUMENT_LUA52 = '[View documents](http://www.lua.org/manual/5.2/manual
HOVER_DOCUMENT_LUA53 = '[View documents](http://www.lua.org/manual/5.3/manual.html#pdf-{})'
HOVER_DOCUMENT_LUA54 = '[View documents](http://www.lua.org/work/doc/manual.html#pdf-{})'
HOVER_DOCUMENT_LUAJIT = '[View documents](http://www.lua.org/manual/5.1/manual.html#pdf-{})'
+HOVER_MULTI_PROTOTYPE = '({} prototypes)'
ACTION_DISABLE_DIAG = 'Disable diagnostics ({}).'
ACTION_MARK_GLOBAL = 'Mark `{}` as defined global.'
diff --git a/server/locale/zh-CN/script.lni b/server/locale/zh-CN/script.lni
index 2b5d33e1..e1f775ef 100644
--- a/server/locale/zh-CN/script.lni
+++ b/server/locale/zh-CN/script.lni
@@ -69,6 +69,7 @@ HOVER_DOCUMENT_LUA52 = '[查看文档](http://www.lua.org/manual/5.2/manual.h
HOVER_DOCUMENT_LUA53 = '[查看文档](http://cloudwu.github.io/lua53doc/manual.html#pdf-{})'
HOVER_DOCUMENT_LUA54 = '[查看文档](http://www.lua.org/work/doc/manual.html#pdf-{})'
HOVER_DOCUMENT_LUAJIT = '[查看文档](http://www.lua.org/manual/5.1/manual.html#pdf-{})'
+HOVER_MULTI_PROTOTYPE = '({} 个原型)'
ACTION_DISABLE_DIAG = '禁用诊断({})。'
ACTION_MARK_GLOBAL = '标记 `{}` 为已定义的全局变量。'
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index b23d5bab..18bf12af 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -6,6 +6,7 @@ local sourceMgr = require 'vm.source'
local config = require 'config'
local matchKey = require 'core.matchKey'
local parser = require 'parser'
+local lang = require 'language'
local State
local CompletionItemKind = {
@@ -123,7 +124,7 @@ local function getDetail(value)
local func = value:getFunction()
local overLoads = func and func:getEmmyOverLoads()
if overLoads then
- detals[#detals+1] = ('(%d 个原型)'):format(#overLoads + 1)
+ detals[#detals+1] = lang.script('HOVER_MULTI_PROTOTYPE', #overLoads + 1)
end
end
if #detals == 0 then
diff --git a/server/src/method/textDocument/signatureHelp.lua b/server/src/method/textDocument/signatureHelp.lua
index 2dd69817..6551464f 100644
--- a/server/src/method/textDocument/signatureHelp.lua
+++ b/server/src/method/textDocument/signatureHelp.lua
@@ -13,10 +13,6 @@ return function (lsp, params)
end
local description = hovers[1].description
- table.sort(hovers, function (a, b)
- return a.label < b.label
- end)
-
local active
local signatures = {}
for i, hover in ipairs(hovers) do
diff --git a/server/test/build_package.lua b/server/test/build_package.lua
index d88dd321..9c6b6859 100644
--- a/server/test/build_package.lua
+++ b/server/test/build_package.lua
@@ -1,7 +1,7 @@
local json = require 'json'
local diagDefault = require 'constant.DiagnosticDefaultSeverity'
-local VERSION = "0.10.1"
+local VERSION = "0.10.2"
local package = {
name = "lua",
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index c60e8ea0..5f43b8d2 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -1304,7 +1304,7 @@ zzz$
{
label = 'zzzzz',
kind = CompletionItemKind.Function,
- detail = '(function)(4 个原型)',
+ detail = '(function)(4 prototypes)',
documentation = {
kind = 'markdown',
value = [[