Commit Graph

28 Commits (f7f55143a1c8f8f643c4ca59d8c4beb9612ef0bb)

Author SHA1 Message Date
Omnikar e91d357fae
Macros (#1234)
* Macros WIP

`helix_term::compositor::Callback` changed to take a `&mut Context` as
a parameter for use by `play_macro`

* Default to `@` register for macros

* Import `KeyEvent`

* Special-case shift-tab -> backtab in `KeyEvent` conversion

* Move key recording to the compositor

* Add comment

* Add persistent display of macro recording status

When macro recording is active, the pending keys display will be shifted
3 characters left, and the register being recorded to will be displayed
between brackets — e.g., `[@]` — right of the pending keys display.

* Fix/add documentation
3 years ago
Blaž Hrastnik 3307f44ce2 ui: popup: Don't allow scrolling past the end of content 3 years ago
Kirawi 29c053e84e
Only use a single documentation popup (#1241) 3 years ago
Gokul Soumya efc2b4c77b
Refactor keyevent handling using key, ctrl macros (#1058)
Adds ctrl! and alt! macros (which existed before the big keymap
refactor) and uses them in event handling of Components. Note
that this converts crossterm's KeyEvent to our own KeyEvent on
each invocation of handle_event in Components.
3 years ago
Blaž Hrastnik 32977ed341 ui: Trigger recalculate_size per popup render so contents can readjust 3 years ago
CossonLeo 011f9aa47f
Optimize completion doc position. (#691)
* optimize completion doc's render

* optimize completion doc's render

* optimize completion doc position

* cargo fmt

* fix panic

* use saturating_sub

* fixs

* fix clippy

* limit completion doc max width 120
3 years ago
Blaž Hrastnik 12ea3888c5 fix: ui: Pin popups with no positioning to the initial cursor position
This avoids the floating popup following the cursor as we type.
3 years ago
Gokul Soumya d84f8b5fde
Show file preview in split pane in fuzzy finder (#534)
* Add preview pane for fuzzy finder

* Fix picker preview lag by caching

* Add picker preview for document symbols

* Cache picker preview per document instead of view

* Use line instead of range for preview doc

* Add picker preview for buffer picker

* Fix render bug and refactor picker

* Refactor picker preview rendering

* Split picker and preview and compose

The current selected item is cloned on every event, which is
undesirable

* Refactor out clones in previewed picker

* Retrieve doc from editor if possible in filepicker

* Disable syntax highlight for picker preview

Files already loaded in memory have syntax highlighting enabled

* Ignore directory symlinks in file picker

* Cleanup unnecessary pubs and derives

* Remove unnecessary highlight from file picker

* Reorganize buffer rendering

* Use normal picker for code actions

* Remove unnecessary generics and trait impls

* Remove prepare_for_render and make render mutable

* Skip picker preview if screen small, less padding
3 years ago
Nathan Vegdahl efa3389b6a Fix unused variable, parameter, and `mut` warnings in helix-term. 3 years ago
Nathan Vegdahl 702a0491db Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left.  Will address in subsequent commits.
3 years ago
Keith Simmons 4418e17547
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view

* fix tests

* clippy and format fixes

Co-authored-by: Keith Simmons <keithsim@microsoft.com>
3 years ago
Ivan Tham 124514aa70 Add cursor kind to separate hidden cursor from pos
Now IME cursor position should be correct since we can still set cursor
position without drawing the cursor.
3 years ago
wojciechkepka 4dbc23ff1c Fix documentation popup panic 3 years ago
Blaž Hrastnik ccdebb99b5 Drop some useless imports. 4 years ago
Blaž Hrastnik ff4c1d05de Replace the Clear widget with buffer.clear/clear_with. 4 years ago
Blaž Hrastnik 1255bcb8a3 Simplify the compositor callback. 4 years ago
Blaž Hrastnik 95d0bba81a ui: Improve completion state handling. 4 years ago
Blaž Hrastnik a24c3fff54 Filter the completion menu based on text entered. 4 years ago
Blaž Hrastnik cbcacb1063 Merge some imports. 4 years ago
Blaž Hrastnik c7ccb432ef pass clippy lint 4 years ago
Blaž Hrastnik 8fe4590666 ui: popup: scroll documentation popups with c-u/c-d. 4 years ago
Blaž Hrastnik 5ea610c41d ui: Move terminal into compositor, redo required_size hints. 4 years ago
Blaž Hrastnik 1d42b95915 ui: wip: Markdown doc renderer. 4 years ago
Blaž Hrastnik a21d96e729 ui: Scrollable popup menu, with scrollbar indicator. 4 years ago
Blaž Hrastnik bd0f6c1dfc clippy lint 4 years ago
Blaž Hrastnik 0b85c16be9 ui: Share popup code with menu.
Menu is now just wrapped in a popup.
4 years ago
Blaž Hrastnik 11c4e0b053 ui: Calculate popup rendering and sizing. 4 years ago
Blaž Hrastnik 7162632eb7 lsp: Hover documentation draft. 4 years ago