diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-05 21:52:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-05 21:52:31 +0800 |
commit | 35962bc062fb778dd4038c9d8d50ea7d601453e1 (patch) | |
tree | e04f6c6365c1dcd585446a536b3592baba2f2609 /script-beta | |
parent | 88f4308a520298c9399850a23dd5f1ae05164334 (diff) | |
download | lua-language-server-35962bc062fb778dd4038c9d8d50ea7d601453e1.zip |
根据 .git/info/exclude 排除目录
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/workspace/workspace.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua index 8fc2d8d9..041379f7 100644 --- a/script-beta/workspace/workspace.lua +++ b/script-beta/workspace/workspace.lua @@ -94,6 +94,13 @@ function m.getNativeMatcher() pattern[#pattern+1] = line end end + buf = pub.awaitTask('loadFile', furi.encode(m.path .. '/.git/info/exclude')) + if buf then + for line in buf:gmatch '[^\r\n]+' do + log.info('Ignore by .git/info/exclude:', line) + pattern[#pattern+1] = line + end + end end -- config.workspace.library for path in pairs(config.config.workspace.library) do |