Commit Graph

1543 Commits

Author SHA1 Message Date
Guldoman c42f01ed1f
Improve IME location updates (#1170)
* Avoid updating IME input rect if it hasn't changed
* Update the IME input rect even when the composition didn't change
* Apply IME input blocking workaround to non-Linux only
2022-12-20 20:11:13 -04:00
Jefferson González 902539b97a
trimwhitespace: expose functionality and extra features (#1238) 2022-12-20 18:13:56 -04:00
Guldoman 213dc7142e
`toolbarview`: Remove tooltip when hidden (#1251) 2022-12-20 18:07:29 -04:00
Jefferson González 3c64c32379
core: ported regex.gsub to faster native version (#1233)
* added regex.gmatch iterator and other fixes
* fixed issues reported by Guldoman
* push strings with fixed len just in case for binary safety
* added limit to regex.gsub and use pushinteger
* added description to regex.gsub limits param
* replaced substitutions regex description for correctness
* ignore negative limits on regex.gsub
2022-12-20 17:46:37 -04:00
Cyriaque Skrapits 5b5b5fd3e3
contextmenu: make divider less aggressive (#1228)
Following changes are applied:
- use divider color instead of caret;
- add a vertical padding on the divider.
2022-12-20 17:29:53 -04:00
Jefferson González e152db2cce
plugins projectsearch: expose its functionality (#1235) 2022-12-14 11:53:20 -04:00
Guldoman 9d48441685
Add `regex.find_offsets`, `regex.find`, improve `regex.match` (#1232)
`regex.match` now behaves like `string.match`.
This required changes in the `tokenizer` and in the `detectindent` 
plugin.
2022-12-11 22:25:42 -04:00
sammyette e13f265fac
feat: alert user via nagview if file cannot be saved (#1230)
* feat: alert user via nagview if file cannot be saved
it will prompt the user to choose whether they
want to save to another location and perform
the save as command
* refactor: change defer draw call to thread
* feat: log error when attempting to save doc
2022-12-11 21:38:58 -04:00
Techie Guy 68595e4c7c
autocomplete: wrap the autocomplete results around (#1223) 2022-12-06 06:21:14 -04:00
sammy dfa2f93d9c
feat: encode home in statusview file path (#1224) 2022-12-06 06:19:52 -04:00
Guldoman f7ad8753eb
Improve `regex.gsub` performance (#1220) 2022-12-02 19:21:05 -05:00
jgmdev 0373d29f99 statusview: respect right padding of item tooltip
When the tooltip was rendered on the last item of right items the right
padding was not properly getting accounted as part of the tooltip width.

This commit also fixes:

* Passing StatusView to item.get_item() instead of StatusView.item
* Some adjustments to annotations.
2022-11-24 12:34:49 -04:00
Guldoman 51f2a291d3
Make `Scrollbar` follow `force_status` when animations are disabled 2022-11-15 21:08:33 +01:00
Guldoman 519b91c2dd
Pass the currently selected item to `CommandView` validation (#1203) 2022-11-15 12:03:13 -04:00
Guldoman c6c485feb0
Use subsyntax info in `doc:toggle-{line,block}-comments` 2022-11-15 16:11:37 +01:00
Guldoman 0a1b8b6bb1
Set initial tokenizer state to a `NULL` byte 2022-11-15 16:01:04 +01:00
Guldoman e147a6cb9b
Add `tokenizer.extract_subsyntaxes` 2022-11-15 16:00:48 +01:00
jgmdev acebbfd88a linewrapping: fix enabled always by mistake introduced with #1190 2022-11-07 13:59:13 -04:00
jgmdev fb43e6f9e6 traceback: some lua versions do not support message as nil 2022-11-07 12:48:09 -04:00
Quinten Kock 4a5851afe5
Make linewrapping plugin recompute breaks before scrolling (#1190) 2022-11-06 22:34:07 -04:00
Jefferson González 9c7304f555
highlighter: autostop co-routine when not needed (#881)
* highlighter: autostop co-routine when not needed

* applied @Guldoman suggestions
2022-11-06 03:38:10 +01:00
Jefferson González b8a4f729df
tokenizer: remove the limit of 3 subsyntaxes depth (#1186)
* tokenizer: remove the limit of 3 subsyntaxes depth

Make the state a string of bytes instead of a 32bits integer to be able
to have deeper subsyntax support. Fixes issues with syntax files like
the one for PHP that was already hitting more than 3 subsyntaxes depth.

* remove unnecesary call to set_subsyntax_pattern_idx

* fixed wrong word on comments
2022-11-03 18:56:20 -04:00
Guldoman 03cc5ffcd1
Add `config.keep_newline_whitespace` option (#1184)
This option will avoid removing line content when pressing enter in 
lines with only whitespace.
2022-11-03 12:40:27 -04:00
Guldoman b029f5993e
Don't sort in `Doc:get_selection_idx` with an invalid index 2022-11-02 21:11:41 +01:00
Jefferson González 69bccf6fcf
docview: support gutter click selection, fixes #1116 (#1169)
* docview: support gutter click selection, fixes #1116

* Added missing call to parent on_mouse_pressed

Also fixed call to selections when `shift` is pressed.

* change to arrow instead of hand

Co-authored-by: Adam <adamdharrison@gmail.com>
2022-11-01 19:34:23 -04:00
Guldoman ed226c476e
Add more options to `Scrollbar` (#1174)
* Make `Scrollbar` accept a table for its options

* Add `force_status`, `{expanded,shrinked}_size` options to `Scrollbar`

* Add `Scrollbar:set_forced_status`

* Add `config.force_scrollbar_status` to force `DocView` scrollbars status
2022-11-01 18:38:50 -04:00
Guldoman 0f160e614e
Improvements to multicursor copy/paste (#1123)
* Add `Doc:get_selection_idx`

* Make multicursor paste add a cursor at the end of each paste

* Better manage paste of multicursor whole line copy

* Document `Doc:get_selection_idx`

* Keep track of last added selection in `Doc`

* Make use of `doc.last_selection` in `Doc` commands

* Make `Doc:get_selection` return the `Doc.last_selection` if possible
2022-11-01 18:16:39 -04:00
Guldoman b52fe1605e
Make MacOS `core:restart` shortcut more in line with other platforms 2022-11-01 21:21:50 +01:00
Guldoman c512d01a68
Fix horizontal scroll with shift+scroll on MacOS
It seems like pressing shift+scroll on MacOS automatically makes it 
shift+horizontal scroll.
2022-11-01 21:20:37 +01:00
Guldoman 8a9bac7de3
Fix `drawwhitespace` drawing lines with different substitution kinds
When multiple substitution kinds are present in the same line, they're 
placed in the cache in an order that's spatially consistent only between 
items of the same kind.
Because we stopped drawing after we reached the first invisible 
substitution, the subsequent kinds weren't drawn even if they should 
have been.
2022-10-30 02:54:30 +01:00
jgmdev 0030c69524 plugin autocomplete: update partial on manual trigger 2022-10-25 17:20:31 -04:00
Guldoman 715411061b
Apply `doc` commands to anything that extends `DocView`
This fixes a regression caused by 
cf29a6a45f.
2022-10-24 04:47:26 +02:00
Jefferson González af6c4bc152
core syntax: strip the path from filename on syntax.get (#1168) 2022-10-22 20:04:54 -04:00
Jefferson González 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
jgmdev 261292c6aa plugin drawwhitespace: allow newline substitution 2022-10-21 13:53:42 -04:00
Adam dd6eee1542
Fixed the common idiom of setting a plugin to true. (#1152) 2022-10-20 18:04:28 -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
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
jgmdev 5aaa5ab273 plugin lineguide: be strict on drawing to DocView 2022-10-15 21:56:34 -04:00
Guldoman 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
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
Guldoman 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ález 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ález 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ález 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
George Sokianos 789004ea2c Updates and fixes for the latest available code, for 2.1 release 2022-10-10 19:06:19 +01:00
Takase 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
Adam d1c74f529a
Changed workspace to accommodate other views. (#1121)
* Added in the ability to pull scrolls from views, as all views have the capability of scrolling now.
2022-10-09 19:55:07 -07:00
Adam 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
Adam 1580d923d3
Fixing minor bug relating to TreeView's cache. (#1136)
Reviewed by Guldo; should fix things, merging.
2022-10-04 18:26:33 -04:00
jgmdev a65a2b293a plugins language_md: fixed some regressions, added caddyfile support 2022-10-02 21:45:54 -04:00
Jefferson González a0164d5902
language_md: don't require space at end on '_', '__', '___' (#1129) 2022-09-28 22:44:42 -04:00
George Sokianos 2bdfd5a694 Merge branch 'master' into amiga-2.0 2022-09-26 17:27:35 +01:00
George Sokianos a5f073d23b Prepare 2.0.3r3 release 2022-09-26 15:44:38 +01:00
George Sokianos 98711e1cb5 Fixes with paths to avoid crashes and now the partition folders are shown in suggestions 2022-09-26 14:21:51 +01:00
George Sokianos b15bcbd397 Fixed search on MorphOS 2022-09-26 14:20:34 +01:00
jgmdev e2884895ce core start: added missing ';' to package.cpath 2022-09-25 17:13:07 -04:00
Adam 6bb08fc68f
Added in ability to have `init.so` as a require for cpath. (#1126) 2022-09-25 17:08:21 -04:00
Adam 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ález 5a80d3547e
contextmenu: resize on scale changes (#1117) 2022-09-15 00:57:45 -04:00
Jefferson González 862ed9ad6a
plugin scale: added option to set default scale (#1115) 2022-09-15 00:54:44 -04:00
Adam 10d810b7d7
Added in simple directory search to treeview. (#1110) 2022-09-14 00:14:13 -04:00
Guldoman 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
jgmdev bead59a898 autocomplete: properly replace current partial symbol 2022-09-12 22:41:50 -04:00
George Sokianos 283f1d0837 Fixed an issue when the user added a directory in the project that already existed 2022-08-29 20:28:33 +01:00
George Sokianos 7b51ee99de Fixed editor refresh whenever init.lua is changed, no matter the working folder 2022-08-28 18:03:34 +01:00
Guldoman c25f83da90
Make predicate for some `TreeView` commands stricter
This avoids performing the `treeview:new-folder` command on ctrl + 
double click.
This happens because `ctrl+lclick` (which is the keybinding for 
`treeview:new-folder`) is triggered also by ctrl + double click, which 
isn't captured by anything else.
2022-08-21 20:03:32 +02: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
Jefferson González 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
Jefferson González 76f71b2846
Merge pull request #1098 from Guldoman/PR_command_predicate_params
Allow command predicates to manage parameters, allow overwriting commands
2022-08-16 18:20:30 -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 06b9953777
Use `Object:is` instead of direct metatable comparison in `autocomplete` 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
Ben Larisch a6bbd3c8a9
language_python: add syntax support for async/await 2022-08-16 09:52:46 +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
Adam 6ccc5f6dde
Steps to generalize toolbar and treeview. (#1088) 2022-08-09 14:53:30 -04:00
Guldoman 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` 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ález 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
Guldoman d7f9b30d05
`drawwhitespace`: Invalidate cache on indent size change 2022-07-15 06:54:03 +02:00
Jefferson González 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
Cyriaque Skrapits af3e2c971c
`language_python`: Add new patterns (#1074)
* `language_python`:  Add new patterns

This commit provides:
 - multiline comments support;
 - unicode string symbol highlighting;
 - class names as keyword2.
2022-07-13 11:06:42 -04:00
Guldoman 2dac3667cb
Merge pull request #1073 from ncarrezdev/ncarrezdev/synxtax-corrections
[chore]: Update syntax
2022-07-13 15:05:26 +02:00
NCarrezDev 7f9287a7e7 [chore]: Delete useless $
follow up on Guldoman's comment
2022-07-13 09:16:32 +02: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
NCarrezDev 030dcc1e62 [chore]: Update syntax
Harmonizing the syntax files
Now inline comment are a single string instead of a table of strings.

-(language_c): Removed whitespaces breaking indent
-(language_html): Removed trailing whitespace
2022-07-06 10:15:44 +02:00
Jefferson González 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ález f49fd1b477
Merge pull request #1064 from Guldoman/PR_md_single_math
`language_md`: Limit inline math mode to the current line
2022-07-05 18:01:59 -04:00
Jefferson González 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ález 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
Jefferson González 041456cf38
Merge pull request #1059 from Guldoman/PR_no_indent_empty_lines
Don't indent empty lines in a selection
2022-07-05 17:52:17 -04:00
Ben Larisch ce0d8b313c
language_python: add syntax support for match-case statement 2022-07-03 15:15:51 +02: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 79dd8779c4
`autocomplete`: Fix "Too many symbols" message when `Doc` has no name
Before, when a `Doc` had no name, an error was thrown.
2022-06-29 05:54:37 +02:00
Guldoman 92c2815aa4
`language_md`: Limit inline math mode to the current line 2022-06-28 20:09:36 +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
Guldoman d6ce9e1ac6
Don't indent empty lines in a selection 2022-06-25 03:32:47 +02:00
Guldoman 438ed6984a
`drawwhitespace`: Invalidate cache on font size change 2022-06-25 03:30:33 +02:00
Guldoman 9cd47aa12e
Fix full line cut when only a single line remains 2022-06-24 05:49:20 +02:00
jgmdev d2f9eeea07 renderer fonts: additions and improvements
* Allow passing font options to renderer.font:copy().
* Added renderer.font:get_path()
* Reintroduced set_size() for more faster font size changes
* Swapped copy wiht set_size on scale plugin for better performance
* Use code_font:copy() instead of renderer.font.load() on language_md to
  properly match user font now that font options are supported on copy.
* Added new changes to renderer docs
2022-06-23 18:08:04 -04:00
jgmdev 31d2024283 lineguide: added config spec 2022-06-23 18:07:27 -04:00
Chris 1e91080680
Improve `lineguide` plugin (#1056)
* Add more options to lineguide
* Allow lineguide plugin to load but remain disabled
* Use config.line_limit for default ruler
2022-06-23 15:24:57 -04:00
Guldoman ec0e3018a8
`findreplace`: Sort last searches 2022-06-23 05:16:47 +02:00
Katrina Grace beefb16469
language_html: Improve subsyntax highlighting (#1043)
* language_html: Improve subsyntax highlighting

- Adjusted `<script>`/`<style>` tag detection to not break when attributes like `defer` are added
2022-06-22 22:56:41 -04:00
Jefferson González 880e6e4f0f
Merge pull request #1040 from Guldoman/PR_tokenizer_errors_alert
Add more tokenizer errors/warnings
2022-06-22 19:43:51 -04:00
Guldoman 522d8a8094
`findreplace`: Fix number of total replacements 2022-06-23 00:16:16 +02:00
jgmdev e0859e1e39 treeview: scale fallback sizes as pointed out by @Guldoman 2022-06-22 01:35:10 -04:00
jgmdev 7b411c3ea9 treeview: restore ability to disable toolbarview 2022-06-22 00:42:26 -04:00
Guldoman 76c1db97f5
`drawwhitespace`: Use `Docview` vertical line offset 2022-06-20 19:56:53 +02:00
Guldoman 205e554d87
Merge pull request #1047 from jgmdev/PR/cv-draw-visible
CommandView: improve performance by only drawing visible
2022-06-20 17:35:06 +02:00
a 8fd00b12cf
Add .cjs and .mjs for js syntax highlighting 2022-06-20 16:12:25 +02:00
jgmdev 665c2cdd4d CommandView: improve performance by only drawing visible 2022-06-20 10:01:28 -04:00
George Sokianos 69bd81188b Merged MOS and OS4 code. Did some more fixes before the 2.0.3r2 release. 2022-06-18 18:17:07 +01:00
jgmdev 173dd3aeb4 plugin treeview: fix crash
When the max_project_files is set to a higher value than the allowed
system maximum file descriptors, and opening a project directory that
causes dirmonitor to open a watch on a lot of files or directories, at
least on MacOSX it causes all system.* file functions to return nil
(for too many opened files) which breaks the project files scan.
2022-06-17 15:35:23 -04:00
Jefferson González 3dadbd3a49
Merge pull request #1038 from takase1121/PR/scale-step-gc
run GC between scale to prevent ram from exploding
2022-06-16 03:04:53 -04:00
Jefferson González 380cfb9a24
Merge pull request #1030 from Guldoman/PR_cache_draw_whitespace
`drawwhitespace`: Cache whitespace location
2022-06-15 21:08:09 -04:00
Guldoman 2d3abd2533
`drawwhitespace`: Invalidate cache on config changes 2022-06-16 00:03:25 +02:00
Jefferson González d2fd5c9df7
Merge pull request #1034 from Guldoman/PR_escape_start_patterns
Check if "open" pattern is escaped
2022-06-15 16:51:34 -04:00
Jefferson González eeea47a2e5
Merge pull request #1033 from Guldoman/PR_utf8_regex_fix
Convert more byte offsets to utf-8 pos in regex tokenizer
2022-06-15 16:51:11 -04:00
Jefferson González 2dc0a5664d
Merge pull request #1029 from Guldoman/PR_math_md
`language_md`: Add math delimiters
2022-06-15 15:32:57 -04:00
Guldoman d169619f69
Warn if token type is a table when not needed 2022-06-15 21:31:16 +02:00
Guldoman 2e37e85a48
Add helper function to report bad patterns in tokenizer 2022-06-15 21:28:46 +02:00
Guldoman 5027a0f12b
Fix malformed pattern check for group patterns in tokenizer
If the token type was a simple string (and not a table), the size of the 
string was used instead of `1`.
2022-06-15 19:33:58 +02:00
takase1121 42e0028f1c
run GC between scale to prevent ram from exploding 2022-06-15 22:56:52 +08:00
Guldoman 5b6b48320f
Check if "open" pattern is escaped
Previously this check was only done for "close" patterns.
2022-06-12 04:19:05 +02:00
Guldoman c947e8a4d1
Convert more byte offsets to utf-8 pos in regex tokenizer 2022-06-12 02:55:36 +02:00
Guldoman f38723ea46
`drawwhitespace`: Cache whitespace location 2022-06-11 06:30:13 +02:00
Guldoman 685956cbdb
Add `Highlighter:update_notify` to keep track of retokenized lines
This is helpful for plugins that need to know when a line has been 
retokenized.
2022-06-11 06:21:55 +02:00
Guldoman 99d328cfd7
Downgrade `StatusView:get_items` deprecation message to warning 2022-06-11 05:13:37 +02:00
Guldoman ed02a55cc1
`language_md`: Add math delimiters 2022-06-10 23:55:41 +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 92c6f1c04f
Merge pull request #1021 from Guldoman/PR_lax_common_merge
Make `common.merge` work with invalid arguments
2022-06-07 20:05:22 -04:00
Jefferson González 439c27447f
Merge branch 'master' into PR_commandview_options2 2022-06-07 19:03:55 -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
Guldoman 0b96be7af2
Make `common.merge` work with invalid arguments
This is needed because users could try to enable plugins with 
`config.plugins.plugin_name = true`.
Before, this would result in `common.merge` throwing an error; now it 
just returns a copy of the "base" table.
2022-06-05 04:10:51 +02:00
jgmdev de63574b53 plugin linewrapping: added priority
Since the linewrapping plugin modifies some of the DocView line
calculation and positioning functions we need to make sure of loading it
before other plugins. This way we make sure that plugins that also overwrite
and depend on DocView functionality aren't using the original methods without
the linewrapping changes, which leads to wrong line and column calculations.
2022-06-03 04:13:54 -04:00
jgmdev 5da7467a5c plugin drawwhitespace: return line height on draw_line_text 2022-06-03 03:16:18 -04:00
jgmdev ca46d8e261 style: move default colors to its own style file 2022-06-02 19:20:54 -04:00
Guldoman ec58b1f0bd
Add `text` and `select_text` to `CommandView` options 2022-06-02 19:30:51 +02:00
Guldoman 6c89a3e575
Add `show_suggestions` to `CommandView` options 2022-06-02 19:30:22 +02:00
Guldoman 8ce1ecb897
Fix `CommandView:enter` deprecation log 2022-06-02 06:42:58 +02:00
jgmdev 4157dd867c plugin drawwhitespace: added config spec 2022-06-02 00:07:34 -04:00
Jefferson González 59a5839ac9
Merge pull request #908 from Guldoman/PR_improve_whitespace
Improve `drawwhitespace` plugin
2022-06-01 21:59:45 -04:00
Adam Harrison 67066fc93a Added in defaults for dirwatch. 2022-06-01 18:36:00 -04:00
Guldoman d390eb248e
Fix tooltip not getting removed after `find-replace:replace` 2022-06-01 18:19:33 +02:00
Guldoman 730ea0c91b
Make `TreeView` more multi-project-dir aware 2022-06-01 06:58:04 +02:00
Guldoman e94c996a26
Add `TreeView` helper functions to get previous/next item 2022-06-01 06:58:04 +02:00
Guldoman 295e6b7e5a
Allow `common.path_suggest` to specify a root directory
This will make relative paths start from `root`.
2022-06-01 06:57:38 +02: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
Jefferson González c09715d0e1
Merge pull request #1004 from Guldoman/PR_commandview_options
Add options table to `CommandView:enter`
2022-05-31 16:38:36 -04:00
jgmdev 2d8a15f3ab plugins: dropped --lite-xl version tag 2022-05-31 16:34:14 -04:00
jgmdev 214f36157a plugins: only check mod version 2022-05-31 16:29:14 -04:00
Jefferson González c62cf5ce8c
Merge pull request #980 from jgmdev/PR/plugins-load-priority
plugins: add load priority support with '--priority:###' closes #978
2022-05-31 11:18:37 -04:00
Jefferson González bd742d5b3d
Merge pull request #999 from Guldoman/tokenizer_regex_groups
Allow regexes in `tokenizer` to split tokens with groups
2022-05-31 11:04:48 -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
Guldoman d8efb1ab53
Show error if language plugin pattern has mismatching number of groups
The number of results from a pattern with groups must never be greater
than the number of token types for that pattern.

Also if a token type was undefined, it's now pushed as a `normal` one.
2022-05-31 02:05:37 +02:00
Guldoman 7ac776bef6
Fix UTF-8 matches in regex group `tokenizer` 2022-05-31 01:59:14 +02:00
Guldoman 4f0d45d6ab
Don't check unnamed files in `autoreload` plugin 2022-05-31 01:03:59 +02:00
Jefferson González 7dc069aa8f
Merge pull request #995 from jgmdev/PR/plugins-settings-gui
plugins: added settings gui support
2022-05-30 16:12:49 -04:00
Guldoman 11e27c6fda
Use new `CommandView:enter` options table 2022-05-30 22:08:13 +02:00
Guldoman e4a806a9d0
Add options to `CommandView:enter`
Now `CommandView:enter` can accept a table that specifies its behavior.

The old behavior is kept for compatibility.
2022-05-30 22:07:39 +02:00
Joshua Barretto 86e3f4a690 Made wrapping overflow optional 2022-05-30 17:13:21 +01:00
Joshua Barretto b3278f6360 Made moving to a line beyond the end of a document move the caret column to the end of the line 2022-05-30 15:40:46 +01:00
Guldoman 2a41002355
Allow using regex groups to split tokens
Before, this was only supported by Lua patterns.

This expects the regex to use the same syntax used for patterns. That 
is, the token should be split by empty groups.
2022-05-28 01:38:22 +02:00
Guldoman 14be51b1ec
Make `regex.match` return all the results 2022-05-28 01:21:41 +02:00
jgmdev 8bbca7c0b0 plugins: added settings gui support 2022-05-23 17:50:10 -04:00
jgmdev b9bb64a2f0 Merge branch 'master' into master-2.1 2022-05-22 22:26:47 -04:00
jgmdev 26e47f7583 plugin contextmenu: simplify predicate 2022-05-15 17:17:28 -04:00
jgmdev 4d3e8d8bd0 command predicates: added support for strict matching by appending '!' on string predicates 2022-05-15 16:10:57 -04:00
Jefferson González 0a66163c10
Merge pull request #987 from jgmdev/PR/fix-object-is-add-extends
object: made is() stricter and added extends()
2022-05-15 15:32:01 -04:00
Jefferson González 28346f13d9
Merge pull request #984 from jgmdev/PR/tokenizer-fix-utf8-bug
tokenizer: fix next utf8 char retrieval bug
2022-05-15 15:28:42 -04:00
Jefferson González 2b9f58b4f6
Merge pull request #982 from jgmdev/PR/keymap-changes
keymap: changes and docs
2022-05-15 15:27:58 -04:00
Adam Harrison daeb2a8e04 Made sure we redrew things, added in a contingency in 'save' for times when we load a non-existent file, and added some checks. 2022-05-15 15:25:02 -04:00
Adam Harrison 5a0d213f3b Changed things over to use dirwatch. 2022-05-15 15:24:44 -04:00
Adam Harrison 20dc101229 As per request from jgmdev, added in ability to show nagview always. 2022-05-15 15:24:28 -04:00
Adam Harrison 173370694e Split out reload functionality to actual document, and added in a thread to check the document, in the cases where it wouldn't be covered by dirwatch. 2022-05-15 15:24:17 -04:00
Adam Harrison d56f4e1ee5 Modified autoreload to use new dirwatch infrastructure, and added in nagview to verify that fs changes don't stomp on our changes, unless you want them to. 2022-05-15 15:23:59 -04:00
Adam 36c4d5d9ed
Autoreload Nagview (#942)
* Modified autoreload to use new dirwatch infrastructure, and added in nagview to verify that fs changes don't stomp on our changes, unless you want them to.

* Split out reload functionality to actual document, and added in a thread to check the document, in the cases where it wouldn't be covered by dirwatch.

* As per request from jgmdev, added in ability to show nagview always.

* Changed things over to use dirwatch.

* Made sure we redrew things, added in a contingency in 'save' for times when we load a non-existent file, and added some checks.
2022-05-15 15:21:26 -04:00
jgmdev 94430bcbd2 tokenizer: fix next utf8 char retrieval bug 2022-05-13 11:21:46 -04:00
jgmdev 59d91087e9 adjust and consolidate duplicated predicate code 2022-05-12 22:15:29 -04:00
jgmdev b8ed4a43f6 keymap: changes and docs
* Prevent adding duplicate bindings
* Clean reverse_map on overwrite or add direct
* Added get_bindings to complement get_binding
* Added doc comments for easier comprehension
* Check if command is function on add_direct
2022-05-12 21:16:02 -04:00
jgmdev fd0a433f59 object: made is() stricter and added extends()
Currently some plugins had/have issues with predicates that check
if active view is a docview to perform certain operations like draw
in the case of minimap or lineguide. Since is() was checking the
entire inheritance tree it was returning true for views that inherit
from the same parent, which caused CommandView to be matched along
DocView, etc... This change does the following to solve the issue:

* Make Object:is() only match the top level parent of the object which
  is more in line with what one would expect from a method named 'is'.
* Introduces Object:extends() which keeps the same functionality that
  Object:is() offered before.
2022-05-12 20:33:01 -04:00
Jefferson González e747dce7fe
Merge pull request #986 from jgmdev/PR/doc-upper-lower-utf8
Add utf8 support on doc lower and upper commands
2022-05-12 18:56:13 -04:00
Jefferson González 2a009186cf
Merge pull request #961 from Guldoman/PR_fix_doc_replace_results
Manage return values from "replacer" function in `Doc:replace`
2022-05-12 18:51:31 -04:00
jgmdev 1d1b3e0a09 Add utf8 support on doc lower and upper commands 2022-05-12 18:33:56 -04:00
jgmdev 359880e963 c core: fix extra utf8 build conflict on windows 2022-05-11 00:22:01 -04:00
Adam 6229f74ccd
Merge branch 'master' into master-2.1 2022-05-09 21:36:10 -04:00
Adam f1f8a9b3f2 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-05-09 21:33:22 -04:00
Adam Harrison ddc3a8842b Fixed dirwatch dummy, and scanning. 2022-05-09 21:30:13 -04:00
jgmdev b3fea8f880 plugins: add load priority support with '--priority:###' 2022-05-05 18:17:32 -04:00
Jefferson González 2c968073e4
Merge pull request #972 from Guldoman/PR_pretty_serialize
Add pretty printing to `common.serialize`
2022-05-05 01:35:04 -04:00
Jefferson González 308431d32a
Merge pull request #971 from jgmdev/PR/core-private-to-public
core: expose rescan_project_directories and configure_borderless_window
2022-05-05 01:34:32 -04:00
Adam Harrison 2eaba8ab92 Erroneously added padding. 2022-05-04 20:08:08 -04:00
Adam Harrison 09bfb8d869 Updated linewrap and autocomplete to use the new get_line_screen_position which takes a col. 2022-05-04 20:05:41 -04:00
Adam Harrison 8345a04d04 Updated treeview to match convention. 2022-05-03 23:13:49 -04:00
Guldoman 0ca0e36009
Open `LogView` in correct `Node`
Using `get_active_node` might result in a locked `Node`; calling 
`add_view` on that `Node` throws an error.

`get_active_node_default` always returns an unlocked `Node`.
2022-05-04 02:58:34 +02:00
Guldoman f8622efc01
Add pretty printing to `common.serialize` 2022-05-03 06:28:34 +02: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 2e0d0995d6
Add typeahead to `CommandView` (#963) 2022-04-30 16:09:40 -04:00
George Sokianos 1e90105944 Prepare 2.0.3r1 release 2022-04-30 14:01:39 +01: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
Guldoman f92f56d42e
Manage return values from "replacer" function in `Doc:replace`
Before the addition of multi-cursor support, we just returned the second 
return value of the "replacer" function to the caller.

With the introduction of multi-cursors, we naively summed the second 
return values for each cursor.
In some cases the "replacer" function doesn't return any second value, 
so we tried to do math with `nil`, thus throwing errors.

Now the second return value is added to a table which is then returned 
to the caller.
2022-04-27 21:53:35 +02:00
Guldoman 3950406750
Catch mouse clicks if `contextmenu` is open
Also disallow re-opening the `contextmenu` if it's already visible.
2022-04-27 17:55:46 +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
Guldoman a7ea84ae8f
Clamp scroll position when dragging the scrollbar without animations 2022-04-26 22:50:44 +02: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
Adam Harrison 6f65168b0d Fixed windows dirmonitor issues. 2022-04-26 12:04:41 -04:00
Guldoman 444b3e3c66
Don't animate scrolling by dragging the scroll bar (#940)
Also added the `config.animate_drag_scroll` option to re-enable the 
behavior.
2022-04-26 09:54:11 -04:00
Guldoman 0c456eb664
Allow functions in `keymap` (#948)
This allows `keymap.add` to map shortcuts to functions.

If the function returns `false`, the next command is executed (as if the
`predicate` of a `command` failed).
2022-04-26 09:48:59 -04:00
Jefferson González e572c58f24
Add utf8 support to tokenizer (#945)
* add utf8 support to tokenizer

* wrap utf8 functions in string table using a 'u' prefix

* document new utf8 functions
2022-04-26 09:42:02 -04:00
Guldoman f42dbb0060
Add animation categories to enable finer transitions control (#941)
* Allow finer control over transitions

* Add categories to transitions
2022-04-25 20:35:35 -04:00
Adam 5df1640595
Merge branch 'master' into master-2.1 2022-04-24 13:42:24 -04:00
Adam 97174706fe
Asynchronous Reads for Dirmonitor (#930)
Change dirmonitor reads to be synchronous, in a secondary thread.
2022-04-24 13:40:58 -04:00
Guldoman bbac7e479c
Set the correct working directory for the AppImage version (#937) 2022-04-20 17:00:48 -04:00
Guldoman 9a5f8e72d0
Add `DATADIR` and `USERDIR` explanation in created user module 2022-04-18 21:14:50 +02:00
Philip Bergwerf 5453a27f91
Add triple single quotes multiline strings to `language_python` 2022-04-18 20:22:25 +02:00
Adam Harrison c112bd8d7c Significantly improved performance of tokenization for larger documents by by default not requiring tokenization. 2022-04-17 13:01:45 -04:00
Adam Harrison d323917538
Added in check in case of nil. 2022-04-15 00:07:20 +02:00
Guldoman 93b31211cb
Apply `drawwhitespace` plugin only to `DocView`s 2022-04-12 04:05:59 +02:00
Guldoman 43086a9c24
Fix missing pixel in scrollbar 2022-04-12 03:20:27 +02:00
Guldoman 4f434d1a41
Show `arrow` cursor when hovering `DocView` scrollbar track 2022-04-12 02:56:41 +02:00
Guldoman 48c371a638
Add scrollbar "track" and resize on hover 2022-04-12 02:56:30 +02:00
Guldoman 052c140787
Fix `DocView:on_mouse_released` not considering all parameters 2022-04-12 02:38:30 +02:00
Guldoman 202e42b568
Avoid calling `View:scrollbar_overlaps_point` uselessly
`View:on_mouse_moved` already updated `self.hovered_scrollbar`, so use 
that instead.
2022-04-12 02:37:21 +02:00
Francesco 16fcb2e751
Merge pull request #913 from lite-xl/auto-complete-syntax-symbols
Add syntax symbols for auto-complete
2022-04-11 20:42:17 +02:00
Francesco Abbate d4f84e1aff Add syntax symbols for auto-complete 2022-04-10 10:32:43 +02:00
Guldoman e5c55e8abc
Early `break` if `autocomplete` needs to update 2022-04-10 04:20:46 +02:00
Guldoman ffe698cef7
Consider last document line to gather `autocomplete` symbols 2022-04-10 04:11:59 +02:00
Adam Harrison 04adb10f97 Added in check in case of nil. 2022-04-03 16:44:02 -04:00
Adam Harrison 974fd9c8d5 Fixed windows dirmonitor issues. 2022-04-03 16:44:02 -04:00
Adam Harrison 562e284d04 Fixed some minor issues with linewrapping. 2022-04-03 16:44:02 -04:00
Adam Harrison 11dfb5b1ca Apparenlty these were issues? What? 2022-04-03 16:44:02 -04:00
Adam 3479890ce5 Soft Line Wrapping (#636)
Added in soft line wrapping.
2022-04-03 16:44:02 -04:00
Adam Harrison 45a0382d50 Bumping version numbers. 2022-04-03 16:44:02 -04:00
Guldoman 50acf2e7e6
Fix keeping scroll position when restoring a `DocView` (#910)
Since 5526041da3 we check a pair of 
line&column to decide if we should scroll to the cursor.
Previously we only considered a single line&column.
2022-04-03 16:24:39 -04:00
Guldoman c70b5130a9
Improve `drawwhitespace` plugin
Add configuration options to specify:
- characters to substitute and their substitution;
- whether to substitute at the beginning, middle or end of the line;
- the color of the substitution;
- the color for the beginning, middle or end;
- the minimum number of white space to show in the middle.
2022-04-01 18:18:50 +02:00
jgmdev 23bd21a191 language_md: remove extra empty line 2022-03-30 09:30:55 -04:00
jgmdev b0c005a5ac syntax: remove pattern re-ordering on optimization
* Introduces a flag that syntax writers can turn off named
  space_handling, turning it off means that your syntax will take care
  of handling the excessive amount of spaces that can slow down the
  tokenizer.
* Adds another pattern at the end of every single table that also
  improves tokenizer performance by matching words that weren't match by
  any of the synxtax patterns.
* Modifies language_md to turn off the provided space_handling and do its
  own since it has rules that require a space at the beginning, also
  handles long consecutives amount of dashes used in tables that degrade
  performance.
* This changes where discussed in collaboration with @Guldoman and
  @takase1121 thanks to all!
2022-03-29 22:11:14 -04:00
Jefferson González 7372d2f82d
Merge pull request #906 from jgmdev/PR/temp-file-other-dir
core: fixes and changes to temp files
2022-03-29 16:33:08 -04:00
Jefferson González aca1cd6b6b
Merge pull request #892 from jgmdev/PR/status-view-move-item
statusview: added functions for easy custom item ordering
2022-03-29 16:25:31 -04:00
Jefferson González 61ad6b052e
Merge pull request #895 from jgmdev/PR/c-cpp-fixes-improvements
language_c/cpp: fixes and improvements
2022-03-29 16:20:22 -04:00
jgmdev e74761da95 language_c/cpp: fixes and improvements
* support colorization of function and variables type declarations
* support the macro concatenation operator ##
* support what seems to be new cpp number notation format #'###
* improved uppercase constants matching
2022-03-29 16:16:12 -04:00
Jefferson González fac54d2ff4
Merge pull request #904 from jgmdev/PR/fix-syntax-optimization
syntax: fix conflicts introduced with #896
2022-03-29 15:44:19 -04: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
jgmdev 5f9d45895d language_md: parenthesis support to numbered bullets 2022-03-28 21:03:59 -04:00
jgmdev e862fe9052 syntax: fix conflicts introduced with #896
* mainly the language_md got affected which has some exotic rules
* some other languages are also using spaces at start of pattern
  and even if not affected this change tackles that
2022-03-28 20:51:09 -04:00
Jefferson González 951f0913da
syntax: add pattern to boost tokenizer performance (#896) 2022-03-25 11:25:32 -04:00
Adam Harrison 3e7a97737e Re-enabled comment cache. 2022-03-22 10:35:44 -04:00
Adam Harrison 17645ba4ec Fixed anonyous syntaxes. 2022-03-22 10:17:42 -04:00
jgmdev c82d6b08d9 statusview: added functions for easy custom item ordering 2022-03-21 18:40:14 -04:00
jgmdev bbac4d1560 treeview: add proper predicate for delete command 2022-03-20 01:58:39 -04:00
jgmdev c3bcf68851 treeview: use root_view:get_primary_node().active_view for focus. 2022-03-20 01:05:07 -04:00
jgmdev f0cc973e38 treeview: also handle focus change from mouse and then commandview 2022-03-20 00:53:13 -04:00
Jefferson González ad25216de7
Merge pull request #890 from Guldoman/PR_treeview_fix_scroll
Fix `TreeView` scroll via scrollbar
2022-03-20 00:31:26 -04:00
Jefferson González 331c78faac
Merge pull request #889 from Guldoman/PR_move_to_selection
Move cursor to the beginning/end of its selection
2022-03-20 00:22:00 -04:00
Guldoman 46f9be2960
Hide hovered `TreeView` item when dragging the scrollbar 2022-03-20 04:46:57 +01:00
Guldoman 699655bebf
Don't specify delta movement when simulating `TreeView:on_mouse_moved` 2022-03-20 04:45:14 +01:00
Guldoman 3765ef1d7a
Move cursor to the beginning or the end of its selection
When using `doc:move-to-{previous,next}-char` in a selection, we were 
moving the cursor to the character before the initial/after the last 
character of the selection.
Now we follow what other editors do and move it to just before the 
initial/just after the final character.
2022-03-20 04:28:26 +01:00
jgmdev b741c204db treeview: better handle previous view when focus/unfocus from CommandView 2022-03-19 23:10:26 -04:00
jgmdev 3ffabced62 treeview: move delete command to proper predicate 2022-03-19 22:33:41 -04:00
Guldoman 3ec0f38446
Make `treeview:collapse` select parent if current item can't collapse 2022-03-18 16:16:55 +01:00
Guldoman 2d5af22dc9
Don't draw `treeview` tooltip if its position is not defined 2022-03-18 16:10:24 +01:00
jgmdev a7fc7b4408 treeview: fix crash on tooltip.x been nil 2022-03-18 06:02:48 -04:00
Jefferson González 30de42f4ab
Merge pull request #755 from Jipok/draw_tab_rework
rootview.lua: Refactor Node:draw_tab
2022-03-18 05:05:55 -04:00
jgmdev e8427ae168 treeview: fixed github merging error 2022-03-18 04:23:32 -04:00
Jefferson González 5a63f6dc2e
Merge pull request #770 from takase1121/treeview-initial-size
add option for treeview initial size
2022-03-18 04:18:56 -04:00
jgmdev 02f6dcc07d treeview: added @AlexSol suggestions
* suggestions included collapse, expand and focus
* also added missing common.merge
* some other minor fixes
2022-03-18 03:57:14 -04:00
takase1121 d5da711b6f add selections in treeview 2022-03-18 03:11:13 -04:00
Guldoman 000caf2e43 Allow opening non existing files from arguments 2022-03-18 01:09:02 -04:00
Guldoman 9763701cbf Reset syntax when a filename is provided 2022-03-18 00:36:25 -04:00
Guldoman fb4a5f3828 Add command to create a new named Doc 2022-03-18 00:34:15 -04:00
Jefferson González 0e323f4a35
Merge pull request #886 from adamharrison/fix-left-click-issues
Fixed a bunch of problems relating to multicursor.
2022-03-17 21:00:51 -04:00
Jefferson González 1f468fca24
Merge pull request #883 from jgmdev/detectindent-improvements
plugin detectident: fixes and improvements
2022-03-17 18:29:46 -04:00
Adam Harrison ba5289dc75 Typo. 2022-03-17 16:57:18 -04:00
Adam Harrison 82325b6a08 Fixed a bunch of problems. Fixed left+click not allowing for square selections, fixed esc not exiting multicursor mode, and allowed cntrl+click to remove a cursor. 2022-03-17 16:55:52 -04:00