* Fix incorrect check in doc:raw_remove
Restore caret position on command doc:cut
* merge cursors and fix new line in clipboard
* add new line to the last copied line
Instead of completely disabling them, we now use their internal toggle.
Also moved `drawwhitespace` commands inside the plugin.
---
* Fixed bug where commands would show even when plugin was disbled. Also removed antiquated way of disabling.
* Fixed typos.
* Also moved trimwhitespace out of config, if it already has a default enabled value of false.
* Changed documentation.
* Clarified comments.
* 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