diff options
author | Christian Storm <storm@mailbox.org> | 2020-10-06 09:39:26 +0200 |
---|---|---|
committer | Christian Storm <storm@mailbox.org> | 2020-10-06 09:39:26 +0200 |
commit | 38db97ac6df1d7f17935b55f09f450d8eca59274 (patch) | |
tree | 9f63fa337b9da9d52d7820a71e318c7572701fb5 | |
parent | 3bcd1fc6672df2e8a36002caa206f67eb0e5781f (diff) | |
download | lua-language-server-38db97ac6df1d7f17935b55f09f450d8eca59274.zip |
Extend gitignore handling to respect .git/info/exclude
Resolves: #230
-rw-r--r-- | script/workspace.lua | 6 |
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 |