summaryrefslogtreecommitdiff
path: root/server/src/method/workspace/didChangeWatchedFiles.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-15 19:24:48 +0800
committersumneko <sumneko@hotmail.com>2019-05-15 19:24:48 +0800
commit632b98d4ddeadadc0c362391020e96ae2736accd (patch)
tree9712c5b1154cb6a45dbc7068914bb4e9bb6d3cd6 /server/src/method/workspace/didChangeWatchedFiles.lua
parent935faea26c5f148651d1371e6979f016a14c3aa0 (diff)
downloadlua-language-server-632b98d4ddeadadc0c362391020e96ae2736accd.zip
整理代码
Diffstat (limited to 'server/src/method/workspace/didChangeWatchedFiles.lua')
-rw-r--r--server/src/method/workspace/didChangeWatchedFiles.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/method/workspace/didChangeWatchedFiles.lua b/server/src/method/workspace/didChangeWatchedFiles.lua
index 06d840e1..dcca48f1 100644
--- a/server/src/method/workspace/didChangeWatchedFiles.lua
+++ b/server/src/method/workspace/didChangeWatchedFiles.lua
@@ -1,4 +1,5 @@
local fs = require 'bee.filesystem'
+local uric = require 'uri'
local FileChangeType = {
Created = 1,
@@ -12,7 +13,7 @@ return function (lsp, params)
end
local needReset
for _, change in ipairs(params.changes) do
- local path = lsp.workspace:uriDecode(change.uri)
+ local path = uric.decode(change.uri)
if change.type == FileChangeType.Created then
lsp.workspace:addFile(path)
if lsp:getVM(change.uri) then