Blaž Hrastnik
2ce87968cd
ui: Be smarter about centering previews
...
Try centering the whole block. If the block is too big for the viewport,
then make sure that the first line is within the preview.
2021-09-08 14:19:25 +09:00
Blaž Hrastnik
a3bd80a6fa
ui: prompt: Avoid allocating a prompt name if it's a static string
2021-08-31 18:29:24 +09:00
Kirawi
b99db7c687
Move path util functions from helix-term to helix-core ( #650 )
2021-08-25 10:04:05 +09:00
Blaž Hrastnik
bf5b9a9f35
ui: Tone down the preview highlight by adding a new scope
2021-08-24 13:25:39 +09:00
Blaž Hrastnik
e6cb183134
ui: Fix preview window padding: we want horizontal, not vertical
2021-08-24 13:25:39 +09:00
Blaž Hrastnik
a5c3c6c6a9
ui: Highlight line ranges in the preview
2021-08-24 13:25:39 +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
Kirawi
da8810809a
use ui.text.focus
for the picker ( fix #622 )
2021-08-20 10:43:08 +09:00
Blaž Hrastnik
4167201344
ui: picker: Position count according to input bar
2021-08-13 18:00:04 +09:00
Blaž Hrastnik
eb9ac0a743
ui: picker: Use ui.selection instead of ui.selection.primary
2021-08-13 17:59:47 +09:00
Blaž Hrastnik
f20dc1283d
ui: picker: Render matches/total counts
2021-08-13 17:56:37 +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
63e54e30a7
Implement in-memory prompt history
...
Implementation is similar to kakoune: we store the entries into
a register.
2021-07-26 11:19:33 +09:00
Ivan Tham
eba0bbda2e
Resume last picker
...
Inspired by space ' in doom emacs.
2021-07-22 11:22:27 +09:00
Nathan Vegdahl
efa3389b6a
Fix unused variable, parameter, and mut
warnings in helix-term.
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
Gokul Soumya
18beda38ac
Add … when chars are truncated in picker
2021-06-25 09:28:24 +09:00
Gokul Soumya
fb8e7dc25b
Fix picker item width overflow
...
Fixes #352
2021-06-24 12:00:08 +09:00
Joe Neeman
fd1ae35051
Make the prompt callback take a Context.
2021-06-23 10:03:11 +09:00
Blaž Hrastnik
20f33ead67
minor: Remove old TODOs
2021-06-22 23:26:34 +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
Ivan Tham
002f1ad397
Add filter ability to picker
...
Inspired by doom emacs. Able to filter picker options multiple times.
2021-06-15 12:00:31 +08:00
Ivan Tham
1953588873
Change picker horizontal split to h
...
Follow window mode and vim behavior, x seemed weird.
2021-06-12 21:17:48 +09:00
Kevin Sjöberg
1bb9977faf
Match keybindings of menu
2021-06-09 09:54:22 +09:00
Kevin Sjöberg
aa8a8baeeb
Calculate offset when moving picker cursor
2021-06-06 19:18:09 +09:00
Kevin Sjöberg
2ac496f919
Do not move past number of matches
2021-06-06 18:04:45 +09:00
Blaž Hrastnik
d54ae09d3b
ESC should exit both completion and insert mode
2021-05-29 10:37:47 +09:00
Blaž Hrastnik
d708efe275
Fix cursor positioning for prompts
2021-05-29 00:06:23 +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
f0712479cb
Define text color (mostly) in theme.toml.
2021-05-07 17:42:09 +09:00
Blaž Hrastnik
8b33ba2284
Correct the naming issue with vsplit and hsplit being swapped.
2021-04-08 15:52:04 +09:00
Blaž Hrastnik
95d0bba81a
ui: Improve completion state handling.
2021-04-05 18:23:37 +09:00
Blaž Hrastnik
5c2d2fda21
Wire up opening in splits via pickers.
2021-03-29 15:21:48 +09:00
Blaž Hrastnik
cbcacb1063
Merge some imports.
2021-03-22 12:40:07 +09:00
Blaž Hrastnik
d4b85ce18d
popup: wip work on completion popups
2021-02-09 15:40:47 +09:00
Blaž Hrastnik
777a80917d
Address clippy lints.
2021-01-08 16:37:36 +09:00
Blaž Hrastnik
56f2193811
Retrieve completion options on ctrl-x.
2020-12-23 16:20:49 +09:00
Blaž Hrastnik
d61b4854b8
Make sure to clear the whole screen with the background color.
2020-12-22 16:48:34 +09:00
Blaž Hrastnik
47e282804d
buffer picker: Mark current view with (*)
2020-12-21 17:58:54 +09:00
Blaž Hrastnik
3d3295bb75
ui: buffer picker on ctrl-b
2020-12-21 16:26:22 +09:00
Blaž Hrastnik
25aa45e76c
picker: Factor out file picker, we want to reuse code for other pickers.
2020-12-18 19:19:50 +09:00
Blaž Hrastnik
8b263ef04b
picker: open file on Enter.
2020-12-18 17:16:04 +09:00
Blaž Hrastnik
edfd3933db
picker: Implement fuzzy search.
2020-12-18 16:43:15 +09:00
Blaž Hrastnik
7c75ec04e8
File picker mockup, reuses the line editor work done on Prompt.
2020-12-17 18:08:16 +09:00