summaryrefslogtreecommitdiff
path: root/script/method/workspace/didChangeWatchedFiles.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-07-08 19:51:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-07-08 19:51:10 +0800
commitae3a20cfd5ea89919326a6499c5a3c93fdfe2120 (patch)
treeb4b337b82bda3a14f300ab30862efd12b6e10650 /script/method/workspace/didChangeWatchedFiles.lua
parent5354d8c339ddb6487f3c0ec1b240eb3e93d19585 (diff)
downloadlua-language-server-ae3a20cfd5ea89919326a6499c5a3c93fdfe2120.zip
fix #187
Diffstat (limited to 'script/method/workspace/didChangeWatchedFiles.lua')
-rw-r--r--script/method/workspace/didChangeWatchedFiles.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/method/workspace/didChangeWatchedFiles.lua b/script/method/workspace/didChangeWatchedFiles.lua
index 3d8fc599..37466a50 100644
--- a/script/method/workspace/didChangeWatchedFiles.lua
+++ b/script/method/workspace/didChangeWatchedFiles.lua
@@ -1,5 +1,6 @@
local fs = require 'bee.filesystem'
local uric = require 'uri'
+local fn = require 'filename'
local FileChangeType = {
Created = 1,
@@ -34,8 +35,8 @@ return function (lsp, params)
end
-- 排除类文件发生更改需要重新扫描
local filename = path:filename():string()
- if ws:fileNameEq(filename, '.gitignore')
- or ws:fileNameEq(filename, '.gitmodules')
+ if fn.fileNameEq(filename, '.gitignore')
+ or fn.fileNameEq(filename, '.gitmodules')
then
needRescan = true
end