diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-29 19:59:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-29 19:59:00 +0800 |
commit | 7e374277a3d8b4dc3856b64772ce0c47650b7a8b (patch) | |
tree | c117f5ecae7f96b15da0c70ebd6ef1a02da5694b /script/provider/provider.lua | |
parent | c6271c7022c91a366b6c81ecda60e9946266c1bd (diff) | |
download | lua-language-server-7e374277a3d8b4dc3856b64772ce0c47650b7a8b.zip |
fix
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 7e06c809..10feb783 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -109,6 +109,7 @@ m.register 'initialize' { if params.rootUri then workspace.initRoot(params.rootUri) + cap.resolve('ROOT_URI', furi.decode(params.rootUri):gsub('\\', '/') .. '/') end if params.workspaceFolders then @@ -188,7 +189,10 @@ m.register 'workspace/didRenameFiles' { filters = { { pattern = { - glob = '**', + glob = '{ROOT_URI}**', + options = { + ignoreCase = true, + } }, }, }, @@ -203,7 +207,7 @@ m.register 'workspace/didRenameFiles' { for _, file in ipairs(params.files) do local oldUri = furi.normalize(file.oldUri) local newUri = furi.normalize(file.newUri) - if files.exists(oldUri) + if workspace.isValidLuaUri(oldUri) and workspace.isValidLuaUri(newUri) then renames[#renames+1] = { oldUri = oldUri, |