summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-18 20:36:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-18 20:36:20 +0800
commita2075b5411c81ab4e7c3da79be1d0e6e56ea7f45 (patch)
treef318445077df15b94776314a650d83adf349a19c /script/provider
parentfb1d31d354648445d975fe827c237351f036c562 (diff)
downloadlua-language-server-a2075b5411c81ab4e7c3da79be1d0e6e56ea7f45.zip
cleanup
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 4b22cb47..b16a076f 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -17,6 +17,7 @@ local converter = require 'proto.converter'
local filewatch = require 'filewatch'
local json = require 'json'
local scope = require 'workspace.scope'
+local furi = require 'file-uri'
---@async
local function updateConfig(uri)
@@ -167,7 +168,7 @@ m.register 'workspace/didCreateFiles' {
log.debug('workspace/didCreateFiles', util.dump(params))
for _, file in ipairs(params.files) do
if workspace.isValidLuaUri(file.uri) then
- files.setText(file.uri, pub.awaitTask('loadFile', file.uri), false)
+ files.setText(file.uri, util.loadFile(furi.decode(file.uri)), false)
end
end
end