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
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
jgmdev
5f9d45895d
language_md: parenthesis support to numbered bullets
2022-03-28 21:03:59 -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
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
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
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
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
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
jgmdev
5830b7d9f0
plugin detectindent: pre-compile regexes
2022-03-17 00:14:36 -04:00
Jefferson González
20763ed7ff
Merge pull request #864 from jgmdev/markdown-adjustments
...
language_md: removed scale adjustment code
2022-03-15 22:14:34 -04:00
jgmdev
dcbebef2ab
plugin detectident: fixes and improvements
...
* Improved performance 67x by not using the tokenizer, this means that
now opening files or saving them where indentation is re-detected
is much more faster.
* Improved the algorithm to detect the space size.
2022-03-15 21:17:15 -04:00
jgmdev
2ce4dbc8ef
language_md: some more improvements
...
* handle images with links
* handle escaping of * and `
* support coloring a heading custom id
* reverted from regex to lua patterns
2022-03-13 14:43:50 -04:00
jgmdev
b880aa42f9
language_c: fixes and improvements
...
* Do not compete with language_cpp.lua over the .h and .inl files,
these files can contain both cpp and c so we choose the former which
supports both syntaxes.
* Added support for magic and uppercase constants.
2022-03-11 17:05:08 -04:00
jgmdev
4b0531cdfc
language_cpp: improvements and fixes
...
* Removed pcall(require, "plugins.language_c") since it doesn't works
as it seems to have been intended.
* Removed duplicate keywords
* Added support for magic and uppercase constants.
* Basically merged most changes from the lite-xl-plugins repo.
2022-03-11 17:02:42 -04:00
jgmdev
48e86bb117
plugin treeview: skip rootview events if not visible.
2022-03-07 16:52:32 -04:00
Adam
f85612e0f0
Fix Project Scanning ( #746 )
...
Removed dmon, and replaced with logic that works across Linux, Mac, FreeBSD and Windows. Have tested on all platforms, and seems to work.
Co-authored-by: Jan200101 <sentrycraft123@gmail.com>
2022-03-06 00:59:22 -05:00
jgmdev
c4f7380a95
language_md: removed scale adjustment code that was needed because of a bug on scale plugin.
2022-03-05 19:13:24 -04:00
jgmdev
e5ca08e13f
plugin scale: replace non existing font.set_size with font.copy
2022-03-05 19:03:33 -04:00
jgmdev
2d3d9a1671
language_md: improvements consolidating #814 and #840
2022-03-04 14:29:29 -04:00
jgmdev
2079e1f707
Plugin projectsearch: set command view text to current document selection.
2022-02-13 01:31:58 -04:00
Adam
a6f32ca0d0
Merge pull request #822 from AlexSol/update_contextMenu
...
Travel by contextMenu using keyboard
2022-02-11 12:10:14 -05:00
jgmdev
6773e85cb8
Update autocomplete with changes needed for latest LSP plugin.
2022-02-03 15:01:39 -04:00
AlexSol
efedbae663
Travel by contextMenu using keyboard
2022-01-29 16:23:00 +02:00
Adam
0a70b13a73
Merge pull request #809 from lite-xl/merge-master-2.0
...
Merge master 2.0
2022-01-28 14:38:22 -05:00
Adam Harrison
456126400a
Added in new merge method, and run it on plugins. Also made it so plugin configs can be set anywhere, even if we don't know the plugin beforehand.
2022-01-22 18:39:23 -05:00
Francesco Abbate
f6a0e12e31
Merge branch 'master-2.0'
2022-01-19 20:31:33 +01:00
Adam
6025c43241
Merge pull request #743 from takase1121/better-logview
...
multiple improvements to logging
2022-01-18 23:25:36 -05:00
Adam
d3e1636881
Merge pull request #771 from takase1121/multiline-comment-command
...
add toggle-block-comment
2022-01-18 21:07:46 -05:00
Francesco Abbate
7473fbf32c
Fix undue asserts in dmon_extra
...
Some asserts are placed in case that can effectively occur
so we remove the assertion and we return false. In turn we
adapt the logic accordingly so when false is returned to add
a watch we do not open that directory.
2022-01-09 23:26:11 +01:00
Adam
93076bdc41
Merge pull request #781 from Jan200101/PR/lua54
...
Migrate to Lua 5.4
2022-01-08 12:11:48 -05:00
Francesco Abbate
143b389365
Clear TreeView cache when closing project
2022-01-07 10:41:18 +01:00
Jan200101
99ddf1fb92
Migrate to Lua 5.4
2021-12-31 13:53:01 +01:00
Francesco Abbate
445c79bb52
Revert "No longer store autocomplete options in config"
...
This reverts commit 0f1b84040d
.
The new mechanism to save config.plugins upon user's configuration
reload let us stay compatible with existing plugins.
2021-12-31 00:22:49 +01:00
Nightwing
60322a93a8
Update toolbarview.lua
2021-12-30 11:12:24 +09:00
Nightwing
46aaf57b45
[Fix] Pointer Bug in ToolBar plugin
...
Fixes an issue where the pointer moves down when "open user module" button is spammed
2021-12-30 06:26:58 +09:00
Francesco Abbate
05b003eeb5
Avoid references to project's dir in TreeView
...
It is not a good practice to keep a reference to the project's
directory object outside of the "core" module itself.
The TreeView was using such a reference in the cache item for each
file or directory entry. Replace the reference to the object with
the absolute name of the project directory.
2021-12-28 14:36:21 +01:00
Francesco Abbate
0f1b84040d
No longer store autocomplete options in config
...
Plugins should not store private stuff in core.config because this
latter can be reloaded due to user changing preferences.
2021-12-28 12:25:48 +01:00
takase1121
69a857bbbf
fallback to toggle-line-comment and vice versa if needed
2021-12-26 15:05:27 +08:00
takase1121
4d31b1bc40
add toggle-block-comment
2021-12-25 12:57:00 +08:00
takase1121
16df6d8bce
add option for initial size
2021-12-24 21:32:28 +08:00
Francesco Abbate
9155be7a22
Ensure TreeView cache entry is removed on delete
...
Address issue:
https://github.com/lite-xl/lite-xl/issues/689
Attempt to provide a more accurate fix to commit:
59f64088e1
For this latter what happens is that any change inside a directory
cause the corresponding entry to be folded in the TreeView.
The new change is more accurate because we remove only the stale
entry corresponding to the delete event and we do not reset the
cache of the parent directory using the modify event.
2021-12-22 23:40:54 +01:00
Guldoman
9e7bdf49e9
Revert "Merge pull request #697 from Guldoman/treeview_remove_changed"
...
This reverts commit 4e078cc217
, reversing
changes made to 0c488c9492
.
2021-12-22 23:39:26 +01:00
Francesco Abbate
37c00c877a
Ensure TreeView cache entry is removed on delete
...
Address issue:
https://github.com/lite-xl/lite-xl/issues/689
Attempt to provide a more accurate fix to commit:
59f64088e1
For this latter what happens is that any change inside a directory
cause the corresponding entry to be folded in the TreeView.
The new change is more accurate because we remove only the stale
entry corresponding to the delete event and we do not reset the
cache of the parent directory using the modify event.
2021-12-20 11:03:49 +01:00
Adam Harrison
e512c57637
Added an exclusion for lineguide in the commandview.
2021-12-20 08:43:48 +01:00
takase1121
ab4ecd515b
multiple improvements to logging
...
- added style.log table
- removed contextmenu
- use ctrl+click to copy individual log entries
- use icon instead of + or - for log items in logview
2021-12-18 10:51:44 +08:00
Guldoman
69de42b078
Set `void` to `keyword2` in `language_c` and `language_cpp` plugins
...
Move `void` to the same syntax type used by other data types.
2021-12-15 18:20:17 +01:00
Adam
997b3efbb7
Merge pull request #708 from Guldoman/treeview_styling
...
Allow `TreeView` item icon and text styling
2021-12-12 12:04:59 -05:00
Adam Harrison
95945d86ab
Removed erroneously added file.
2021-12-11 17:51:51 -05:00
Adam Harrison
7b55470159
Fixed treeview clicking not being caught.
2021-12-11 17:51:19 -05:00
Guldoman
c16d6b3d8d
Avoid drawing hidden `TreeView` items
2021-12-07 21:45:20 +01:00
Guldoman
fdb29f28cf
Split `TreeView:draw` into multiple functions
...
This allows plugins to override each aspect of TreeView item drawing.
2021-12-07 21:44:20 +01:00
Adam
994c62b64a
Merge pull request #497 from lite-xl/fix-javascript-regexp-syntax
...
Try to fix problem with js syntax of '/=' operator
2021-12-06 00:17:07 -05:00
Adam
2997aa2652
Merge pull request #705 from Guldoman/check_if_proj_dir
...
Check the entire path in `TreeView` predicate
2021-12-05 14:23:34 -05:00
Nightwing
0705c23c35
Improved Markdown syntax highlighter
2021-12-03 23:50:23 +09:00
Guldoman
d7afcb08b1
Check the entire path in `TreeView` `new-file` and `new-folder` commands
2021-11-30 01:11:35 +01:00
Guldoman
e500368ce4
Allow `TreeView` item icon and text styling
2021-11-29 23:36:49 +01:00
Guldoman
ef4c02ab0e
Check the entire path in `TreeView` predicate
2021-11-28 07:16:53 +01:00
Adam
a607ef95f9
Merge pull request #682 from Guldoman/indent_refactor
...
Refactor how to get the indentation of a `Doc`
2021-11-27 11:55:36 -05:00
Adam
1b22c85dd5
Merge pull request #694 from adamharrison/fix-context-menu
...
Added in cut, copy and paste to the context menu, amongst other things.
2021-11-27 11:44:10 -05:00
Adam
4e078cc217
Merge pull request #697 from Guldoman/treeview_remove_changed
...
Remove changed files/dirs from `TreeView` cache
2021-11-26 22:07:19 -05:00
Adam
fe6ba4adb7
Merge pull request #696 from adamharrison/fix-lineguide
...
Added an exclusion for lineguide in the commandview.
2021-11-24 13:28:04 -05:00
Adam
9b24563b84
Merge pull request #692 from adamharrison/draw-whitespace-color
...
Added in the ability to specify a color for whitespace.
2021-11-24 13:23:34 -05:00
Guldoman
59f64088e1
Remove changed files/dirs from `TreeView` cache
2021-11-24 06:16:54 +01:00
Adam Harrison
f7b3a2b0c2
Added an exclusion for lineguide in the commandview.
2021-11-23 22:35:11 -05:00
Adam Harrison
64f66e5d1e
Added in cut, copy and paste to the context menu. Also removed find pattern, as that's no longer a valid command. Also made it so commands only show up if their predicates are valid.
2021-11-23 21:03:38 -05:00
Adam Harrison
3162f4ea4f
Added in the ability to specify a color for whitespace.
2021-11-23 18:42:01 -05:00
PIESEL
00d555b016
Apply again cd10497b49
...
Use Python syntax highlighting for Ren'Py scripts.
2021-11-23 22:24:03 +01:00
Adam Harrison
96db380c73
Manual merge of into .
2021-11-23 15:57:22 -05:00
Guldoman
955acf53a3
Merge pull request #673 from vincens2005/master
...
Add BigInt literal and numeric separators to js syntax highlighter
2021-11-22 22:23:23 +01:00
cukmekerb
65f1251767
JS hex BigInts and hex numeric separators
2021-11-22 12:15:19 -08:00
Joshua Minor
373007a767
Switched to TreeView:color_for_item(abs_path)
2021-11-21 15:24:45 -08:00
Joshua Minor
bede0ff878
Allow for color overrides in the tree view
2021-11-21 00:24:24 -08:00
Guldoman
3176b467ca
Add names to language plugins
2021-11-21 03:46:43 +01:00
Guldoman
2de48b6ac8
Adapt `detectindent` to the new indentation architecture
2021-11-20 04:40:58 +01:00
Takase
d7c309d8e2
Merge branch 'master' into lineguide-config
2021-11-17 11:59:59 +08:00
Guldoman
6a7a02542f
Draw only visible whitespaces
2021-11-17 02:57:14 +01:00
cukmekerb
46f81e0bad
add BigInt literal and numeric separators to js syntax highlighter
2021-11-15 09:20:34 -08:00
Adam Harrison
7a3e8ed86a
Added in mousewheel as part of this.
2021-11-14 15:41:28 -05:00
Adam Harrison
4e313d9fc5
Propogated mouse clicks correctly.
2021-11-14 15:41:28 -05:00
Guldoman
f99afcd29c
In `TreeView` set correct active `View` before opening new `DocView`
...
Before this, the new `DocView` was always added to the primary `Node`.
With this, it gets added to the last focused `Node`.
2021-11-07 23:12:03 +01:00
PIESEL
cd10497b49
Use Python syntax highlighting for Ren'Py scripts.
...
Ren'Py is a very popular Python visual novel engine, which has it's own "coding language" (even GitHub shows it as a separate language) and it's own file extension.
Generally Python syntax highlighting works for the Ren'Py language.
2021-11-01 16:30:15 +01:00
Francesco Abbate
ffb66cefd7
Fix python docstring highlighting
...
From PR:
https://github.com/lite-xl/lite-xl/pull/624
contributed by @dflock.
2021-10-23 15:01:16 +02:00