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
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
d323917538
Added in check in case of nil.
2022-04-15 00:07:20 +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
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
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