summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-06 16:27:30 +0800
committerGitHub <noreply@github.com>2020-10-06 16:27:30 +0800
commitbed58336e80377f874384f875531596e53cb2032 (patch)
tree9f63fa337b9da9d52d7820a71e318c7572701fb5 /script
parent3bcd1fc6672df2e8a36002caa206f67eb0e5781f (diff)
parent38db97ac6df1d7f17935b55f09f450d8eca59274 (diff)
downloadlua-language-server-bed58336e80377f874384f875531596e53cb2032.zip
Merge pull request #231 from stormc/git-info-exclude
Extend gitignore handling to respect .git/info/exclude
Diffstat (limited to 'script')
-rw-r--r--script/workspace.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/workspace.lua b/script/workspace.lua
index d2699851..0795877c 100644
--- a/script/workspace.lua
+++ b/script/workspace.lua
@@ -58,6 +58,12 @@ function mt:buildScanPattern()
pattern[#pattern+1] = line
end
end
+ buf = io.load(self.root / '.git' / 'info' / 'exclude' )
+ if buf then
+ for line in buf:gmatch '[^\r\n]+' do
+ pattern[#pattern+1] = line
+ end
+ end
end
-- config.workspace.library
for path in pairs(config.config.workspace.library) do