Commit Graph

67 Commits

Author SHA1 Message Date
Francesco Abbate ddd56ec615 Add command to remove a directory from the project
In addition directories can be removed with a mouse middle-click in the
tree view pane.
2020-12-28 15:51:16 +01:00
Francesco Abbate c042bfc907 Change project files output to not include a prefix '/' in filename
It make sense to not put the initial '/' in the filename as the name
is relative to the top directory it belongs to.

By removing the the initial '/' in the filename we can re-introduce the
variable

core.project_files

to stay compatible with standard Lite. The project_files variable will
always point to the files table of the first entry of
core.project_directories.
2020-12-28 10:26:27 +01:00
Francesco Abbate df74781da8 Fix project search and status view for new add directory feature 2020-12-27 18:28:21 +01:00
Francesco Abbate e4fa196b33 Finalize add project directory feature 2020-12-27 11:32:52 +01:00
Francesco Abbate 39181a56fd Use relative path for filenames in project directories 2020-12-27 09:47:58 +01:00
Francesco Abbate 5449781353 Minor cleanup to project directory stuff 2020-12-26 23:39:27 +01:00
Francesco Abbate 54518c438d Cosmetic changes to names from previous commit 2020-12-26 23:29:18 +01:00
Francesco Abbate ec730e9520 Test configuration with project_files stored separately for each directory 2020-12-26 21:22:57 +01:00
Francesco Abbate 2f50f21f57 Preliminary version of projects with multiple directories 2020-12-26 16:48:08 +01:00
Francesco Abbate 9e8e8f7543 Remove priority run mechanism 2020-12-26 11:30:20 +01:00
Francesco Abbate 499f085045 Use get_primary_node instead of Rootview:get_primary_view 2020-12-15 12:51:36 +01:00
Francesco Abbate eadbe41064 Add core.on_quit function for plugins
To be used for plugins like workspace from exi/lite-plugins
2020-12-14 13:57:24 +01:00
Francesco Abbate 3a38ded396 Use core.reload_module instead of style.load 2020-12-13 13:04:06 +01:00
Francesco Abbate 1fc0409163 Merge branch 'project-manager' 2020-12-12 20:27:07 +01:00
Francesco Abbate 40ac899360 Restore core.quit and core.temp_filename to be compatible with Lite 2020-12-12 00:05:11 +01:00
Francesco Abbate 2373c63a0b Complete the initial user configuration file 2020-12-11 14:49:03 +01:00
Francesco Abbate 9114148b45 Automatically reload style when saving the project user module 2020-12-10 17:56:53 +01:00
Francesco Abbate 6409b67ea2 Add core:restart function to restart the editor 2020-12-10 12:44:01 +01:00
Francesco Abbate 33109e6110 Fix responsiveness problem of open-folder command 2020-12-09 15:45:16 +01:00
Francesco Abbate ba898b50fc Force a clear of treeview on switch project 2020-12-08 23:35:49 +01:00
Francesco Abbate 8448eee79f More accurate list of recent projects 2020-12-08 18:49:58 +01:00
Francesco Abbate f882957ebc Experimentally add priority run when scanning project files
Avoid yielding when a first scan is required but seems quite
ineffective.
2020-12-08 16:59:05 +01:00
Francesco Abbate e88adc0567 Move project manager into core init file 2020-12-08 16:57:57 +01:00
Francesco Abbate ebaa2b4f26 Fix bug related to creation of user's init file 2020-12-07 17:38:36 +01:00
Francesco Abbate ca9bf21819 Reword name for identifying primary view 2020-12-06 13:24:55 +01:00
Francesco Abbate 23575b309e Fix syntax error with previous commit 2020-12-06 11:37:05 +01:00
Francesco Abbate 1c4b8cf315 Fix documentation and behavior for 1.13 release 2020-12-06 11:23:33 +01:00
Francesco Abbate 926e004c41 Preliminary version of project manager
Adapted from contribute rxi/lite-plugins but changed to avoid restarting
the application when switching project.

Current problem:
- the reload of the treeview take some time without any feedback for the
  user
2020-12-06 00:57:27 +01:00
Francesco Abbate a337f893d9 Implement user's config as init file and add directory into package.path
Create the user's config init file if lite user's config directory does
not exists.

No longer use the awkward package.searchers but instead add user's
config dir at the end of package path.
2020-12-02 16:03:31 +01:00
Francesco Abbate 3589d7d3c0 First implementation of unix-like data directory
It basically works by setting the data directory to

$prefix/share/lite-xl

where $prefix is determined so that $prefix/bin corresponds to EXEDIR.

The packages 'user' and 'user.*' are loaded from the directory
'$HOME/.config/lite-xl'.
2020-12-02 00:23:15 +01:00
Francesco Abbate 70412b520b Fix cursor blinking problem
The problem was that when the editor had no events the cursor was not
blinking because the event loop was blocking on wait_event.

Now we no longer calls wait_event without a timeout if the windows has
the focus. When the window has the focus the timeout is set to 1 / fps
so that the cursor can blinks.

In addition we react to the "focus lost" event to ensure the documents
are redrawn without the cursor.
2020-11-21 16:36:32 +01:00
Francesco Abbate 82dc76dd00 Add recently visited files in the list when using find file command 2020-11-16 23:52:51 +01:00
Francesco Abbate 16e6a6db9d Stop scanning project file when a maximum limit is reached
To avoid excessive memory usage when opening in a directory with too many files.

Introduce the config variable config.max_project_files to choose the limit.

The mechanism introduced avoid using excessive memory but it fails to
let user access all the files in the directory. A better implementation
should not impose any limits but read each subdirectory on-demand, only
as they are expanded in the tree-view.
2020-11-16 18:12:55 +01:00
Francesco Abbate edaa8fb42b Add a mechanism to avoid blank window at startup 2020-11-16 14:49:41 +01:00
Francesco Abbate fe0dda8309 Merge remote-tracking branch 'rxi/master' into agg-font-renderer 2020-06-16 15:00:47 +02:00
Francesco Abbate 2c6bd874fa Avoid running when there are no events and threads do not need to run 2020-06-16 14:54:08 +02:00
rxi 7517d0ef55 Changed EXEDIR to be used as default project dir 2020-06-13 08:56:13 +01:00
rxi 7fbefe40d5 Made `system.set_window_title` only be called on title change 2020-05-30 08:53:48 +01:00
rxi 74755f5b4a Simplified implementation of `core.temp_filename()` 2020-05-27 11:38:42 +01:00
rxi 064b6d0b95 Fixed changing of cwd and loading of commandline files
the current-working-directory is now set at the start of `core.init` after the
absolute path for all filename arguments have been resolved
2020-05-26 10:26:20 +01:00
rxi 257b9ab753 Added `core.temp_filename()` 2020-05-25 08:58:12 +01:00
rxi c2d27ab3f7 Removed `core.project_dir` 2020-05-24 13:50:32 +01:00
rxi 82e33dd2de Moved event-waiting when not focused to after run_threads() 2020-05-24 13:43:34 +01:00
rxi 946c125fd4 Changed `core.redraw` to be set to `true` by default
As the window isn't created until the first frame is drawn this is required to
assure the window is ever shown without relying on the assumption that some
other part of the program would have set this to true
2020-05-24 08:04:47 +01:00
rxi 28b1844a8b Added support for dropping a folder onto the window 2020-05-23 11:31:08 +01:00
rxi 7aabfebfa0 Fixed mouse-position resolution when dropping a file 2020-05-20 10:33:08 +01:00
rxi 08ce7e2563 Fixed stuck mouse-drag-selection on dropped-file
Resolves #109
2020-05-20 09:52:01 +01:00
rxi bc4bf3d384 Added core.set_active_view(); removed `focusable` boolean from View 2020-05-19 14:55:46 +01:00
rxi 8ec717f240 Added temporary backwards compatibility for `core.project_dir` 2020-05-18 10:28:01 +01:00
rxi 4ae0d477c0 Made lite set project dir to CWD; removed core.project_dir
Fixes #100
2020-05-17 17:05:56 +01:00