summaryrefslogtreecommitdiff
path: root/script/library.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-15 16:54:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-15 16:54:33 +0800
commite3ad79681b235981a958dda9a98e94311f303293 (patch)
treef0b1e24373c3639dc12c441007976293e146a11c /script/library.lua
parent0d3bb3d01942f387ca30af51db13241e71f30378 (diff)
downloadlua-language-server-e3ad79681b235981a958dda9a98e94311f303293.zip
fix hover: document uri
Diffstat (limited to 'script/library.lua')
-rw-r--r--script/library.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/library.lua b/script/library.lua
index 06b7d8f4..a49bef85 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -9,7 +9,7 @@ local m = {}
local function getDocFormater()
local version = config.config.runtime.version
- if client.client() == 'vscode' then
+ if client.isVSCode() then
if version == 'Lua 5.1' then
return 'HOVER_NATIVE_DOCUMENT_LUA51'
elseif version == 'Lua 5.2' then
@@ -58,6 +58,7 @@ local function createViewDocument(name)
if not fmt then
return nil
end
+ name = name:match '[%w_%.]+'
return ('[%s](%s)'):format(lang.script.HOVER_VIEW_DOCUMENTS, lang.script(fmt, 'pdf-' .. name))
end