Commit Graph

25 Commits (b55ca8fdb843972ee11f73e9e32b966541da4ba8)

Author SHA1 Message Date
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.
2021-11-11 00:58:46 +09:00
Blaž Hrastnik 32977ed341 ui: Trigger recalculate_size per popup render so contents can readjust 2021-09-13 17:44:50 +09:00
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
2021-09-08 16:33:59 +09:00
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.
2021-08-19 11:25:19 +09:00
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
2021-08-12 16:00:42 +09:00
Nathan Vegdahl efa3389b6a Fix unused variable, parameter, and `mut` warnings in helix-term. 2021-07-01 19:06:52 -07:00
Nathan Vegdahl 702a0491db Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left.  Will address in subsequent commits.
2021-07-01 19:06:52 -07:00
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>
2021-06-25 12:58:15 +09:00
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.
2021-06-15 23:46:21 +08:00
wojciechkepka 4dbc23ff1c Fix documentation popup panic 2021-06-10 11:26:03 +09:00
Blaž Hrastnik ccdebb99b5 Drop some useless imports. 2021-05-09 18:32:40 +09:00
Blaž Hrastnik ff4c1d05de Replace the Clear widget with buffer.clear/clear_with. 2021-05-09 18:13:50 +09:00
Blaž Hrastnik 1255bcb8a3 Simplify the compositor callback. 2021-05-09 18:02:31 +09:00
Blaž Hrastnik 95d0bba81a ui: Improve completion state handling. 2021-04-05 18:23:37 +09:00
Blaž Hrastnik a24c3fff54 Filter the completion menu based on text entered. 2021-03-27 12:08:44 +09:00
Blaž Hrastnik cbcacb1063 Merge some imports. 2021-03-22 12:40:07 +09:00
Blaž Hrastnik c7ccb432ef pass clippy lint 2021-03-11 16:15:54 +09:00
Blaž Hrastnik 8fe4590666 ui: popup: scroll documentation popups with c-u/c-d. 2021-03-08 17:32:13 +09:00
Blaž Hrastnik 5ea610c41d ui: Move terminal into compositor, redo required_size hints. 2021-03-08 17:00:32 +09:00
Blaž Hrastnik 1d42b95915 ui: wip: Markdown doc renderer. 2021-03-05 16:07:46 +09:00
Blaž Hrastnik a21d96e729 ui: Scrollable popup menu, with scrollbar indicator. 2021-03-03 17:28:50 +09:00
Blaž Hrastnik bd0f6c1dfc clippy lint 2021-03-02 18:29:15 +09:00
Blaž Hrastnik 0b85c16be9 ui: Share popup code with menu.
Menu is now just wrapped in a popup.
2021-03-02 18:24:24 +09:00
Blaž Hrastnik 11c4e0b053 ui: Calculate popup rendering and sizing. 2021-03-02 17:58:15 +09:00
Blaž Hrastnik 7162632eb7 lsp: Hover documentation draft. 2021-02-25 18:07:47 +09:00