diff --git a/data/core/config.lua b/data/core/config.lua index 74ca3d2f..36a67add 100644 --- a/data/core/config.lua +++ b/data/core/config.lua @@ -3,7 +3,7 @@ local config = {} config.project_scan_rate = 5 config.fps = 60 config.max_log_items = 80 -config.message_timeout = 3 +config.message_timeout = 5 config.mouse_wheel_scroll = 50 * SCALE config.file_size_limit = 10 config.ignore_files = "^%." diff --git a/data/core/init.lua b/data/core/init.lua index e8b26739..0e2f46ce 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -173,11 +173,10 @@ local function project_scan_thread() if entries_count > config.max_project_files then core.project_files_limit = true core.status_view:show_message("!", style.accent, - "Too many files in project directory: stopping reading at ".. - config.max_project_files.." files according to config.max_project_files. ".. - "Either tweak this variable, or ignore certain files/directories by ".. - "using the config.ignore_files variable in your user plugin or ".. - "project config.") + "Too many files in project directory: stopped reading at ".. + config.max_project_files.." files. For more information see ".. + "usage.md at github.com/franko/lite-xl." + ) end dir.files = t core.redraw = true diff --git a/doc/usage.md b/doc/usage.md index d92ea707..90f6dc8d 100644 --- a/doc/usage.md +++ b/doc/usage.md @@ -71,6 +71,13 @@ The project module can be edited by running the `core:open-project-module` command — if the module does not exist for the current project when the command is run it will be created. +## Big directories +Often projects contain compiled, bundled or downloaded files which you don't want to edit. These files can be excluded from projects by configuring `config.ignore_files`. Such a configuration might look like `config.ignore_files = { "^%.", "node_modules" }`. This will exclude the `node_modules` folder and any file starting with `.`. You can add this to a user or project module. + +If a project has more files than the maximum (configured with `config.max_project_files`) lite-xl will switch to a different mode where files are lazily loaded. + +_Note: Because of lazy loading `core:find-file` will open `core:open-file` instead._ + ## Add directories to a project In addition to the project directories it is possible to add other directories