Commit Graph

34 Commits (bca98b5bedfa6c9410384f26a2df6115874351bc)

Author SHA1 Message Date
CossonLeo bca98b5bed
Add c-j c-k to menu keymap for move_up move_down (#908) 2021-10-26 09:42:08 +09:00
Blaž Hrastnik 182a59b552 Update to rust 1.56 + 2021 edition 2021-10-22 12:15:18 +09:00
Blaž Hrastnik 2c0468ffd1 fix: If backspacing past the start offset, cancel completion
Refs #822
2021-10-16 18:43:07 +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 d6a9c2c0f6
Add ui.menu text style (#664)
* add menu text style

* add ui.menu.text ui.info ui.info.text to book

* change ui.menu.text to ui.menu

* fix book's ui.menu
2021-08-28 13:54:24 +09:00
Gokul Soumya f9375f449c
Refactor new Rect construction (#575)
* Refactor new Rect construction

Introduces methods that can be chained to construct new Rects
out of pre-existing ones

* Clamp x and y to edges in Rect chop methods

* Rename Rect clipping functions
2021-08-21 14:21:20 +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
Blaž Hrastnik f917b5a441 ui: completion: Use sort_text to sort the completions 2021-08-11 10:56:32 +09:00
Blaž Hrastnik b20a5c4c0e ui: menu: Allow wrapping around on ctrl-p/shift tab 2021-08-06 11:22:23 +09:00
Blaž Hrastnik 1789dfabfe fix: ui/menu: Don't allow scrolling past the end of completion
Fixes #472
2021-07-23 18:12:33 +09:00
Blaž Hrastnik 58d08d36ae Simplify ui/menu.rs 2021-07-23 18:10:17 +09:00
Blaž Hrastnik 5292fe0f7d Calculate completion popup sizing
Fixes #220
2021-07-19 11:29:51 +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
Blaž Hrastnik cad14c6b46 Address nightly clippy warnings 2021-06-27 13:27:47 +09: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
Kevin Sjöberg 29962a5bd9 Fix Shift-Tab for moving upwards in menu 2021-06-09 09:53:40 +09:00
Blaž Hrastnik 3336023614 ui: Menu rendering adjustments 2021-05-28 00:01:17 +09:00
Blaž Hrastnik b114cfa119 Display more data in completion popups. 2021-05-22 17:33:42 +09:00
Blaž Hrastnik ccdebb99b5 Drop some useless imports. 2021-05-09 18:32:40 +09:00
Blaž Hrastnik 1255bcb8a3 Simplify the compositor callback. 2021-05-09 18:02:31 +09:00
Blaž Hrastnik f0712479cb Define text color (mostly) in theme.toml. 2021-05-07 17:42:09 +09:00
Blaž Hrastnik fd4fd12fa3 clippy lint 2021-05-06 17:20:00 +09:00
Blaž Hrastnik 95d0bba81a ui: Improve completion state handling. 2021-04-05 18:23:37 +09:00
Blaž Hrastnik ceea5eacd8 clippy lint 2021-03-31 23:42:16 +09:00
Blaž Hrastnik a24c3fff54 Filter the completion menu based on text entered. 2021-03-27 12:08:44 +09:00
Blaž Hrastnik 350081a3af Fix crash if pressing enter when nothing selected in completion. 2021-03-24 18:15:42 +09:00
Blaž Hrastnik cbcacb1063 Merge some imports. 2021-03-22 12:40:07 +09:00
Blaž Hrastnik b7dd7310c4 syntax: Reuse parser instances. highlight_iter() no longer needs &mut. 2021-03-12 14:46:23 +09:00
Blaž Hrastnik ddcf5156c0 ui: menu: Adjust scroll via required_size area caching. 2021-03-08 17:13:45 +09:00
Blaž Hrastnik 5ea610c41d ui: Move terminal into compositor, redo required_size hints. 2021-03-08 17:00:32 +09:00
Blaž Hrastnik a21d96e729 ui: Scrollable popup menu, with scrollbar indicator. 2021-03-03 17:28:50 +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 d4b85ce18d popup: wip work on completion popups 2021-02-09 15:40:47 +09:00