Commit Graph

280 Commits

Author SHA1 Message Date
Jan 662fde364b Add View dragging (#1402) 2023-08-07 14:50:58 +01:00
Adam 7ca0ec18ca Added in support for foreground and background events. (#1395) 2023-08-07 14:50:58 +01:00
Adam ee80b451c6 Added in explicit touchscreen keyboard support. (#1389) 2023-08-07 14:50:58 +01:00
Adam 1becf35508 Disable `trimwhitespace` and `drawwhitespace` via their configs (#1446)
Instead of completely disabling them, we now use their internal toggle.

Also moved `drawwhitespace` commands inside the plugin.

---

* Fixed bug where commands would show even when plugin was disbled. Also removed antiquated way of disabling.

* Fixed typos.

* Also moved trimwhitespace out of config, if it already has a default enabled value of false.

* Changed documentation.

* Clarified comments.
2023-08-07 14:50:58 +01:00
Guldoman b005454652 Limit `core.threads` without a timeout to run 30 times per second 2023-08-07 14:50:58 +01:00
Adam Harrison 73ff025552 Made things clearer, as per jgm's suggestion. 2023-08-07 14:50:58 +01:00
Adam 7f0651155d Made coroutines make more sense, and fixed a bug. (#1381)
* Made coroutines make more sense, and fixed a bug.

* Fixed typo.

* Additional checking for off-cycles.

* Fixed issue with calling step too much.

* If we have no redraw, set next step time for next frame.

* Added in `now` variables to reduce calls.
2023-08-07 14:50:58 +01:00
Jefferson González 84039331a5 NagView: properly rescale on scale change (#1379)
* drop font option since style.font is always used
2023-08-07 14:50:58 +01:00
Guldoman 57cd4e2949 Make mod-version follow semver (#1036)
* Make mod-version follow semver
  Now plugins can optionally specify the minor and patch version they 
support.
  If no minor or patch version is specified, it's considered 0.
  Plugins are only loaded if they have the same major version and a 
  smaller or equal minor+patch version.
* Add modversion to logging and plugin mismatch nagview

---------

Co-authored-by: Jefferson González <jgmdev@gmail.com>
2023-08-07 14:50:58 +01:00
Adam f74716b436 Getting rid of annoying forward slash on windows. (#1345) 2023-08-07 14:50:58 +01:00
Adam 4682092b8d Added in Config Postload (#1336)
* Added in an `onload` variable to configs which is called by the plugin loader.

* Used appropriate parameter.

* Fixed tabbing.
2023-08-07 14:50:43 +01:00
Dave 4e272c33de Minor typos in init text 2022-12-30 13:32:20 +01:00
Simon Krauter 8603644726
Fix two typos in data/init.lua (#1272) 2022-12-27 19:56:30 -04:00
Martin Ashby d4989d98bd
Add example settings to _overwrite_ an existing key binding (#1270) 2022-12-27 18:40:22 -05:00
jgmdev fb43e6f9e6 traceback: some lua versions do not support message as nil 2022-11-07 12:48:09 -04:00
Takase 437b954595
make the default core.ignore_files more specific (#1160)
* make the default core.ignore_files more specific

instead of blanket ignoring all dotfiles, we define a list of folders
and files to ignore. this makes the overall experience better.

* fix wrong path pattern

* add ignore_files to user init
2022-10-19 22:23:01 -04:00
Guldoman 5c2c95765e
Add IME support (#991) 2022-10-15 19:58:51 -04:00
Jefferson González f89088d0ec
dirmonitor: add watch to subdirs on file limit mode (#1155) 2022-10-13 00:37:52 -04:00
Jefferson González 214c9d6287
dirwatch: exit coroutine if project not open anymore to properly gargage collect it (#1142) 2022-10-11 13:22:44 -04:00
Aqil Contractor 9b1bfeacac
Added a smoothing and strikethrough option to font loading. (#1087)
* Added a smoothing option to font loading.
* Added a font strikethrough option to font loading.
* Fixed underline applying incorrectly in cases of non-underlined fallback fonts being used.

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2022-08-20 16:15:08 -04:00
cisoun 366cadf605
Add font style options in user module 2022-07-15 12:05:59 +02:00
Guldoman 259de54c33
Fix opening `LogView` when reloading customizations
As `reload_customizations` was called during save operations, opening 
the `LogView` changed `core.active_view` which caused some errors to be 
thrown.
2022-06-28 04:21:43 +02:00
jgmdev 3f206db69a initial documentation for better code completion 2022-06-07 22:09:34 -04:00
Jefferson González ff641cdb06
Merge pull request #1022 from Guldoman/PR_annoy_on_reload_error
Open `LogView` on user/project module reload error
2022-06-07 20:06:56 -04:00
Jefferson González 2fc20330a3
Merge pull request #1010 from Guldoman/PR_improve_multiproject_treeview
`TreeView` improvements for multi-project
2022-06-07 18:24:54 -04:00
Guldoman 237f0c91cb
Open `LogView` on user/project module reload error 2022-06-05 04:29:24 +02:00
jgmdev ca46d8e261 style: move default colors to its own style file 2022-06-02 19:20:54 -04:00
Guldoman 9a428648a9
Add `common.is_absolute_path` 2022-06-01 04:42:50 +02:00
Jefferson González 13d062479a
Merge pull request #1005 from Guldoman/PR_improve_logs
Add `warn` log level and backtraces
2022-05-31 16:38:47 -04:00
jgmdev 214f36157a plugins: only check mod version 2022-05-31 16:29:14 -04:00
Guldoman fae9af96bf
Expose function to create custom log entries 2022-05-31 02:35:56 +02:00
Guldoman db2d30caaf
Add `warn` log level 2022-05-31 02:26:42 +02:00
Guldoman c92f6a7b7f
Always show backtrace for `error` log entries 2022-05-31 02:26:18 +02:00
jgmdev b3fea8f880 plugins: add load priority support with '--priority:###' 2022-05-05 18:17:32 -04:00
jgmdev b5fe333345 core: expose rescan_project_directories and configure_borderless_window 2022-05-02 13:55:25 -04:00
Guldoman d3c38d699c
Merge pull request #966 from adamharrison/check-plugin-load-time
Added plugin load-time log.
2022-05-02 01:59:12 +02:00
Adam Harrison 548dbf67c2 Added in log to show total time. 2022-04-30 16:23:05 -04:00
Guldoman 9de75988ba
Send `mouseleft` event when the mouse leaves the window (#928)
* Send `mouseleft` event when the mouse leaves the window

* Call `View:on_mouse_left` when the mouse leaves the `View`

Previously `View:on_mouse_left` was called only when the mouse left the
window, and it was called on every visible `View`.

Now it gets also called when the mouse "changes" `View`, and only the
last `View` the mouse was on will receive the event.
2022-04-28 21:50:34 -04:00
Adam Harrison b7db7cd533 Added plugin load-time log. 2022-04-28 21:42:53 -04:00
Guldoman ac42e6457a
Check if `USERDIR` doesn't exist in `core.delete_temp_files` 2022-04-28 01:55:07 +02:00
Adam 4934e741b3
TreeView Changes (#898)
* Change to 1 click as per RFC on discord, with 100% in favour.

* Added in the ability to specify  as a view name, so it doesn't modify the title, and also fixed a bug where if you clicked *over* the amount of times your config says, it wouldn't regsiter.

* Changed plugin to use keymap.
2022-04-26 18:29:05 -04:00
Adam 4bf4851736 Asynchronous Reads for Dirmonitor (#930)
Change dirmonitor reads to be synchronous, in a secondary thread.
2022-04-26 12:13:39 -04:00
Guldoman 9a5f8e72d0
Add `DATADIR` and `USERDIR` explanation in created user module 2022-04-18 21:14:50 +02:00
jgmdev ca37644aa9 core: fixes and changes to temp files
* fix delete_temp_files() deleting in EXEDIR but temp_filename() was
  creating temp files in USERDIR
* make delete_temp_files() public so it can be used by plugins
* add optional `dir` parameter to both delete_temp_files() and
  temp_filename() to allow specifying a different directory, this is
  for example useful when generting markdown previews, the temp file
  should be generated in the project dir in case the readme references
  images that are relative to it, so the web browser can find them.
2022-03-28 22:36:49 -04:00
Guldoman 000caf2e43 Allow opening non existing files from arguments 2022-03-18 01:09:02 -04:00
jgmdev d9909cf4ea config: added skip_plugins_version
This new config flag ignores the plugins version check at startup
which helps a lot when working on new or old plugins that doesn't match
the mod or lite-xl version and you still desire to load them to fix them
by checking with lite-xl it self which errors need to be corrected.
2022-03-10 22:29:33 -04:00
jgmdev eeb2b28a03 config overwritten on user/project modules save
When a user modifies and saves the init.lua or a project module file the
reload_customizations() function was performing unnecessary reloading
of core.config and core.style. This resulted on the replacement of config
tables with new tables, breaking all active references been used by
the consumers of this config options. Been redundant this means
that every consumer was using its own copy of a configuration table
different from the one referenced on core.config and user changes not
taking place.
2022-03-09 02:15:01 -04:00
Adam 960b482061
Fixed some issues with inotify and multiple events at the same time. (#872)
* Fixed some issues with inotify and multiple events at the same time. Seems to be working now.

* Cleaned up and simplified function, and commented, and fixed a number of bugs.

* Simplifying and fixing further.

* Improved performance for skipping large amounts of files.

* Added in extra checks, and changed paths. We should probably unify these path styles.

* Fixed stutter.

* Removed extraneous functions.

* Cleaned up more, added more testing; dealt with multiple sequential events correctly.
2022-03-08 19:30:25 -05:00
jgmdev 9d4e475a2c init: also load default nodes and commands before user plugins and project module. 2022-03-06 21:21:00 -04:00
jgmdev d7d88a2037 init: load core views before user plugins 2022-03-06 21:03:16 -04:00