Added `config.ignore_files`
Filenames that match either the single pattern provided by `config.ignore_files`, or any pattern in a table of patterns, will be ignored when lite is filling the `core.project_files` table Resolves #77 Resolves #102
This commit is contained in:
parent
1abb979490
commit
4644154e5b
|
@ -6,6 +6,7 @@ config.max_log_items = 80
|
|||
config.message_timeout = 3
|
||||
config.mouse_wheel_scroll = 50 * SCALE
|
||||
config.file_size_limit = 10
|
||||
config.ignore_files = "^%."
|
||||
config.symbol_pattern = "[%a_][%w_]*"
|
||||
config.non_word_chars = " \t\n/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-"
|
||||
config.undo_merge_timeout = 0.3
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
require "core.strict"
|
||||
local common = require "core.common"
|
||||
local config = require "core.config"
|
||||
local style = require "core.style"
|
||||
local command
|
||||
|
@ -34,7 +35,7 @@ local function project_scan_thread()
|
|||
local dirs, files = {}, {}
|
||||
|
||||
for _, file in ipairs(all) do
|
||||
if not file:find("^%.") then
|
||||
if not common.match_pattern(file, config.ignore_files) then
|
||||
local file = path .. PATHSEP .. file
|
||||
local info = system.get_file_info(file)
|
||||
if info and info.size < size_limit then
|
||||
|
|
Loading…
Reference in New Issue