* Add icons support to autocomplete plugin
* Removed redundant flag check
* Added support for non syntax colors
* Assert if color name not in style.syntax
* Autocomplete plugin improvements
* Support suggestion symbols scoping
- global: all open documents
- local: current document
- related: all open documents with same syntax
- none: language syntax symbols only
* Register style.syntax[] entries as icons
* Other related fixes
* Use normalized strokes when removing duplicates only when appropriate
* Use normalized stroke in `keymap.unbind`
* Normalize strokes by sorting the modifiers before the keys
This also sorts the modifiers in a fixed manner, decided by
`modkeys.keys`.
We need to do this because we display the strokes in a few places like
the command palette.
* docs(core.common): add and improve documentation
* refactor(core.common): remove unused variable to get_height()
* docs(core.common): remove messy newlines
* docs(core.common): fix wording
* docs(core.common): use integer instead of number
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* docs(core.common): update docs
the docs now follow the style in docs/ directory.
some of the changes suggested are also implemented.
* docs(core.common): fix typo
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* docs(core.common): restyle annoatations
Extra whitespaces are removed and @overload is used whenever possible.
* docs(core.common): fix various documentation errors
* docs(core.common): simplify unicode description
* docs(core.common): fix return value
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* docs(core.common): clarify common.bench for not being a benchmark
* docs(common): add disclaimer for numbers in common.serialize
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* fix#1538 log scrolls automatically
adds:
- when user scrolls, position is kept no matter how many new entries
arrive
- when user scrolls up to last entry, autoscroll is enabled again
does not add buttons to jump up/down
see #1538
* move scroll-test out of on_mouse_wheel
* determine diff_index with loop
* remove check at move_towards yoffset
* use while loop instead of repeat loop
* remove meaningless setter
* remove stray var
* Revert "core syntax: strip the path from filename on syntax.get (#1168)"
This reverts commit af6c4bc152.
The previous behavior was correct and allowed access to the full path for path-dependant syntaxes.
* Use `Doc.abs_filename` to obtain syntax when possible
This allows matching full paths in language syntaxes, but we lose the
possibility of matching the project root.
* Add mouse grab
We now also send mouse movement events only to the interested view.
* Add deprecation messages handler
* Make various `View`s respect `on_mouse_left`
* `StatusView`
* `TitleView`
* `TreeView`
* `ToolbarView`
* Fix scrollbar in `TreeView` not updating
We were in some cases sending outdated mouse positions to the scrollbar,
which made it think that the mouse was hovering it.
This also updates the hovered item more responsively during scroll.
* The comment patterns had to come before the string ones
* The smallest indentation size is now taken into consideration even if
it only occurs once, we just make sure its size is more than 1 space.
* Restore horizontal scroll position after scale change
* Consider `View` horizontal size when restoring horizontal scroll
This is needed because `View:get_h_scrollable_size` includes the
horizontal size, while `View.scroll.x` doesn't.
* Added in double-clicking on emptyview and tab bar.
* Fixed issue with split tabs.
* Early exit if no overlapping node.
* Changed category of command to tabbar.
* Additional cleanup.
* Changed for whether we should show tabs.
* Fixed erroneous hover.
* 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