* 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.
* Make `TreeView` follow the current tab
* Use `TreeView:toggle_expand` in `TreeView:set_selection_to_path`
We can't use `item.expanded` directly because we need to update the
cached tree structure.
* Add `Object:{is_class_of,is_extended_by}` to check inverse relationships
* Make tab scrolling more flexible
This adds tab scrolling commands and connects them to mouse scroll
events.
This way scrolling behavior can be customized more easily.
For example an alternative behavior could be:
```lua
keymap.add({
["wheelup"] = "root:switch-to-hovered-previous-tab",
["wheeldown"] = "root:switch-to-hovered-next-tab"
})
```
* Allow empty groups as first match in tokenizer
* Avoid pushing tokens with empty strings
* Allow groups to be used in end delimiter in tokenizer
* Use the first entry of the type table for the middle part of a subsyntax
This applies to delimited matches with a table for `type` and without a
`syntax` field.
* Match only once if using `at_start` in tokenizer `find_text`
* Check if match is escaped in the "close" case too
Also allow continuing matching if the match was escaped.
* Warns user if trying to disable a plugin that is already
enabled when doing `config.plugins.plugin_name = false` and also
prevents replacing the current plugin config table with the false
value to mitigate runtime issues.
* Uses a merge strategy by default when assigning a table to a plugin
config to prevent a user from removing a plugin default config values
as experienced and explained on this issue lite-xl-plugins#158
* This change is basically backwards compatible, but will require a
change on the settings ui plugin on how it checks for already
enabled plugins, since rawget will no longer be a working hack
or workaround for this.
* As suggested by Adam dropped loaded key and switched to package.loaded
* 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>
* fix Doc contextmenu not registering commands if scale plugin is not found
* fix TreeView contextmenu commands not working if the mouse hovers DocView
* add keyboard navigation to TreeView contextmenu
* fix incorrect contextmenu predicate
* refactor: remove sort_positions usage
* refactor: move draw conditional to has_any_selection and other changes
- snake case (sssss)
- break after finding selection
* fix: typo of config plugins
* fix: do check for show selected only properly
* feat: only draw within selection per substitution
* `drawwhitespace`: Make `show_selected_only` work properly
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* Stop drawing text past the `DocView` edge in `DocView:draw_line_text`
* Don't add draw commands if they fall outside the latest clip
The check was previously done with the window rect, so this will reduce
a bit more the number of commands sent.
The result of `a.filename < b.filename` is sometimes different from
`system.path_compare(a.filename, a.type, b.filename, b.type)` which
causes issues to `file_bisect`, as it expects the sorting to be done
with `system.path_compare`.
Impacts `treeview:{rename,new-file,new-folder,open-in-system}`.
Previously those were only available when the mouse was over the
`TreeView`.
They now use the same predicate as `treeview:delete`.
* fix: move tab scroll buttons to remove spacing before 1st tab
* fix: always show tab scroll buttons
* fix: cleanup code, get scroll button rect for correct button
* fix: expand to full size for tabs if scroll buttons arent visible
* fix: define n as visible tabs number
* 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
* 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
* 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
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.
* 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
* 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>
* 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
* 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
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.
* 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
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.
* 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.
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.