Commit Graph
1025 Commits
Author SHA1 Message Date
Jefferson GonzálezandGitHub af6c4bc152 core syntax: strip the path from filename on syntax.get (#1168) 2022-10-22 20:04:54 -04:00
Jefferson GonzálezandGitHub f02b3c46e6 Merge pull request #1167 from jgmdev/PR/new-lines
* plugin drawwhitespace: allow newline substitution
* docview: do not render newline fixes #1164
2022-10-22 19:56:43 -04:00
jgmdev 3da6833249 docview: do not render newline fixes #1164 2022-10-21 13:56:23 -04:00
AdamandGitHub dd6eee1542 Fixed the common idiom of setting a plugin to true. (#1152) 2022-10-20 18:04:28 -04:00
TakaseandGitHub 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
Adam 1c5936e697 Fixup minor drawing issue. 2022-10-18 16:01:32 -04:00
Guldoman decbac4ac6 Check if scrollbar is no longer hovered on mouse release 2022-10-16 04:43:15 +02:00
Guldoman 6ca56fee1a Only consider left clicks on the scrollbar 2022-10-16 04:40:03 +02:00
GuldomanandGitHub 6b754eb628 Refactor scrollbar into its own file (#1124)
* Move scrollbar to its own file
* Don't call `Scrollbar` functions if `View` is not scrollable
* Allow horizontal scrolling in `Scrollbar`
* Add horizontal scrollbar to `View`
* Add `root:horizontal-scroll` command with `shift+wheel` keymap
* Prioritize vertical scrollbar hover
* Don't send mouse movement to vertical scrollbar when dragging horizontal one
* Fix clicking on horizontal scrollbar track
* Implement `start` scrollbar alignment
* Add documentation to `Scrollbar`
* Make `DocView` infinitely scrollable horizontally
* Handle horizontal scroll SDL event
2022-10-15 20:12:15 -04:00
GuldomanandGitHub 5c2c95765e Add IME support (#991) 2022-10-15 19:58:51 -04:00
Jefferson GonzálezandGitHub f89088d0ec dirmonitor: add watch to subdirs on file limit mode (#1155) 2022-10-13 00:37:52 -04:00
GuldomanandGitHub 334a7da5c9 Use the syntax with the longest match (#919)
This way, for example, a syntax that applies to `docker-compose.yml` 
files will take precedence over one that applies to `*.yml` files.
2022-10-12 18:10:11 -04:00
Jefferson GonzálezandGitHub 0fc793d1ae Add on_scale_change event to View (#1146)
* core view: emit on_scale_change event
* core titleview: reconfigure hit_test on rescale fixes #1144
2022-10-11 14:44:32 -04:00
Jefferson GonzálezandGitHub 214c9d6287 dirwatch: exit coroutine if project not open anymore to properly gargage collect it (#1142) 2022-10-11 13:22:44 -04:00
Jefferson GonzálezandGitHub a7888e96ea Add fsevents backend to dirmonitor (#1141)
* dirmonitor: added backend reporting of watch mode

* dirmonitor: added fsevents backend for macos
2022-10-10 20:40:41 -04:00
TakaseandGitHub 3409929a0c draw lite-xl icon in TitleView (#1143)
the original hamburger menu icon is confusing. It is not a menu
and clicking it doesn't do anything. There is no reason why
we can't draw lite-xl's icon in place of that.
2022-10-10 11:05:30 -04:00
AdamandGitHub 9e816154ad Added in an additional ENVVAR for setting USERDIR, and also changed / to PATHSEP. (#1139)
* Added in an additional ENVVAR for setting USERDIR, and also changed / to PATHSEP.

* Forgot a /
2022-10-08 20:48:30 +02:00
jgmdev e2884895ce core start: added missing ';' to package.cpath 2022-09-25 17:13:07 -04:00
AdamandGitHub 6bb08fc68f Added in ability to have init.so as a require for cpath. (#1126) 2022-09-25 17:08:21 -04:00
AdamandGitHub 5ada80b9df Added in native modules suffixes. (#1111)
* Added in native modules with suffixes, giving priority to those with matching architectures and platforms.

* PowerPC isn't x86, and it's x86_64.

* Changed things over to allow compiler to set a tuple, makes more sense from a build perspective.

* Spelling mistake.

* Added in arm target tuples.
2022-09-18 18:27:50 -04:00
jgmdev 4134b30ffd core: remapped core:restart to ctrl+alt+r
Commonly `ctrl+shift+r` is used in most editors for find and
replace operations, also the regexreplacepreview.lua plugin makes
a more appropriate use of this binding.
2022-09-16 11:31:05 -04:00
Jefferson GonzálezandGitHub 5a80d3547e contextmenu: resize on scale changes (#1117) 2022-09-15 00:57:45 -04:00
GuldomanandGitHub a19cfb4f80 Strictly limit find/replace commands to core.docview (#1108)
Without this, find/replace commands applied to the `CommandView` too,
with buggy results.
2022-09-13 22:29:52 -04:00
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
Jefferson GonzálezandGitHub f07b62f852 Merge pull request #1100 from Guldoman/PR_fix_path_suggest
Remove dot slash from suggested paths in `common.path_suggest`
2022-08-17 13:59:19 -04:00
Guldoman 4c186b07a3 Be more lenient with appending PATHSEP in common.path_suggest in Windows
This allows to use the Unix separator without resulting in ugly 
suggestions that added the Windows separator too.

For example:
Before: `data/` -> `data/\core\`
After: `data/` -> `data/core\`
2022-08-17 00:11:19 +02:00
Guldoman e8ca861512 Remove final PATHSEP in common.normalize_volume 2022-08-16 23:53:03 +02:00
Guldoman a4355c6536 Add PATHSEP before listing the directory in common.path_suggest
Before, in Windows, listing `.` instead of `.\` resulted in unexpected 
results.
2022-08-16 23:51:12 +02:00
Guldoman 6aa96556c0 Replace assert with core.log_quiet on command replace
This caused issues when saving the user module with commands defined
inside it, as it resulted in the user-defined commands trying to
overwrite themselves and failing.
2022-08-16 22:18:50 +02:00
Guldoman d944bd85ec Add predicate memoization to command.get_all_valid 2022-08-16 22:13:25 +02:00
Guldoman cf29a6a45f Allow command predicates to manage parameters passed to the commands
When a command is performed with parameters, those are now passed to the
predicate.
The predicate can then return, after the validity boolean, any other
value that will then be passed to the actual command.
If the predicate only returns the validity boolean, the original
parameters are passed through to the actual command.

This allows predicates to manipulate the received parameters, and allows
them to pass the result of an expensive computation to the actual
command, which won't have to recalculate it.

String and table predicates will now also return `core.active_view`.
2022-08-16 22:13:16 +02:00
Guldoman 4b4c54ba65 Remove dot slash from suggested paths in common.path_suggest
When no `root` is specified and the initial `path` is empty, the initial 
`path` becomes `.`.
This results in returned files/dirs that are prepended with `./`.

Now, in that case, `./` is removed.
2022-08-16 08:08:04 +02:00
AdamandGitHub 6ccc5f6dde Steps to generalize toolbar and treeview. (#1088) 2022-08-09 14:53:30 -04:00
GuldomanandGitHub 4db71836af Clear default Lua require path (#1085)
This is mainly done to avoid requiring from the current working 
directory of the editor.

This also avoids requiring from system paths, as it was already the case 
for the native modules search path.
2022-08-03 11:13:26 -04:00
ian`andGitHub 2667f9476b Fix "hard" indent column info on status view. (#1078)
* Fix "hard" indent column info on status view.

* Update tabs calculation and add "byte" number info

* Add config.show_char_byte_info

* Add show char byte toggle command.

it should be added on the commands/statusbar.lua, but there is no config module loaded before and i won't to add it.

* Update config.lua

* Update statusview.lua
2022-07-22 19:01:54 +02:00
Jefferson GonzálezandGitHub e4bef5c5b6 Merge pull request #1080 from jgmdev/PR/fix-commandview-caret
CommandView: do not change caret size with config.line_height
2022-07-17 12:29:52 -04:00
jgmdev c7781a76a9 CommandView: do not change caret size with config.line_height 2022-07-15 11:27:27 -04:00
cisoun 366cadf605 Add font style options in user module 2022-07-15 12:05:59 +02:00
Jefferson GonzálezandGitHub 86d45458f8 Merge pull request #1070 from Guldoman/PR_get_selections_swap_return
Make `Doc:get_selection[s]` return if the selection was actually sorted
2022-07-13 11:13:43 -04:00
Guldoman 9cfa3ecd56 Make StatusView:add_item accept a table 2022-07-13 07:22:42 +02:00
Guldoman 693bd11b22 Don't wrap around if there are no suggestions in CommandView 2022-07-11 23:28:08 +02:00
Guldoman e7c4bdfe8e Make Doc:get_selection[s] return if the selection was actually sorted 2022-07-11 05:39:55 +02:00
Jefferson GonzálezandGitHub e646f2fb28 Merge pull request #1065 from Guldoman/PR_log_size
Increase `config.max_log_items`, add a scrollbar and optimize `LogView`
2022-07-05 18:07:33 -04:00
Jefferson GonzálezandGitHub f611556f1a Merge pull request #1062 from Guldoman/PR_fix_logview_on_error
Fix opening `LogView` when reloading customizations
2022-07-05 18:00:56 -04:00
Jefferson GonzálezandGitHub 58336f6060 Merge pull request #1060 from Guldoman/PR_drag_whitespace_newline
On `doc:newline` remove line content if it contains only whitespace
2022-07-05 17:56:13 -04:00
Guldoman 7888bf08e9 LogView: Show scrollbar 2022-07-01 05:29:55 +02:00
Guldoman b84a510d42 Increase default maximum number of log items
The low number in some cases resulted in hidden errors.
2022-07-01 05:29:54 +02:00
Guldoman caf106be1d LogView: Don't draw invisible items 2022-07-01 05:29:45 +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
Guldoman c792b13666 On doc:newline remove line content if it contains only whitespace 2022-06-25 03:57:47 +02:00