summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-27 20:51:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-27 20:51:21 +0800
commitca19e2ea1d6df45e7e2fa1ac7bd910e083a13600 (patch)
treecf99a88c03f8f07a9aca1985f4e279452b2f75a9 /server/src
parentd61d771ee3e3e470da5b3542357b9b4610fd4eef (diff)
parentf3f86af8e69cf2f71af7caa57b708cbbee0be88c (diff)
downloadlua-language-server-ca19e2ea1d6df45e7e2fa1ac7bd910e083a13600.zip
Merge commit 'f3f86af8e69cf2f71af7caa57b708cbbee0be88c' into emmy-meta
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/completion.lua3
-rw-r--r--server/src/method/textDocument/signatureHelp.lua4
2 files changed, 2 insertions, 5 deletions
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