* 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.