diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-30 17:47:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-30 17:47:49 +0800 |
commit | fe3e9088bdbec0f2a46704bbab4f4f460a38992e (patch) | |
tree | a6fc9dcf0a8693d47a290b285d38e28c33aebc7b /script | |
parent | d15a62ec1f0957eb464c7f5c08e0b8bcad6bd487 (diff) | |
download | lua-language-server-fe3e9088bdbec0f2a46704bbab4f4f460a38992e.zip |
some fix
Diffstat (limited to 'script')
-rw-r--r-- | script/client.lua | 2 | ||||
-rw-r--r-- | script/plugin.lua | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/script/client.lua b/script/client.lua index 1ade4a9e..93ac38b3 100644 --- a/script/client.lua +++ b/script/client.lua @@ -102,7 +102,7 @@ function m.awaitRequestMessage(type, message, titles) map[title] = i end local item = proto.awaitRequest('window/showMessageRequest', { - type = type, + type = define.MessageType[type] or 3, message = message, actions = actions, }) diff --git a/script/plugin.lua b/script/plugin.lua index e66e410f..392b92af 100644 --- a/script/plugin.lua +++ b/script/plugin.lua @@ -51,7 +51,8 @@ local function resetFiles() end local function checkTrustLoad() - local trusted = util.loadFile(LOGPATH / 'trusted') or '' + local filePath = LOGPATH .. '/trusted' + local trusted = util.loadFile(filePath) or '' local lines = {} for line in util.eachLine(trusted) do lines[#lines+1] = line @@ -67,7 +68,7 @@ local function checkTrustLoad() return false end lines[#lines+1] = m.pluginPath - util.saveFile(LOGPATH / 'trusted', table.concat(trusted, '\n')) + util.saveFile(filePath, table.concat(lines, '\n')) return true end |