diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-13 14:31:08 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-13 14:31:08 +0800 |
commit | 9948129ec4acfca9e1a83da1fe8ab9d823d75f33 (patch) | |
tree | 49d44863442d26a35d51a5bdbf9369588fe09449 | |
parent | 4f6c7afe9cf83e62e8c41d8c981fbbfe4d0c7067 (diff) | |
download | lua-language-server-9948129ec4acfca9e1a83da1fe8ab9d823d75f33.zip |
是不是lua文件还是得单独判断
-rw-r--r-- | server/src/workspace.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/server/src/workspace.lua b/server/src/workspace.lua index c69b6399..c701bfa9 100644 --- a/server/src/workspace.lua +++ b/server/src/workspace.lua @@ -141,14 +141,6 @@ function mt:buildScanPattern() end end end - -- config.files.associations - pattern[#pattern+1] = '*.*' - pattern[#pattern+1] = '!*.lua' - for k, v in pairs(config.other.associations) do - if fileNameEq(v, 'lua') then - pattern[#pattern+1] = '!' .. k - end - end return pattern end @@ -184,6 +176,9 @@ function mt:scanFiles() log.debug(...) elseif mode == 'path' then local path = fs.path(...) + if not self:isLuaFile(path) then + return + end self._loadFileRequest:push(path:string()) count = count + 1 elseif mode == 'stop' then |