Commit Graph

67 Commits (caac568ded9b1d2fe5f30f2ad65e35bb6a0f7b8a)

Author SHA1 Message Date
Pascal Sommer 75dfaff338
Add some function documentations (#5360) 1 year ago
Blaž Hrastnik ec9aa66902
Remove redraw to fix build 1 year ago
Roberto Vidal f916915b53
add redraw command (#4354)
* add redraw command

* update docs

* Update helix-term/src/commands/typed.rs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* update docs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Blaž Hrastnik 758bace221
fix test compilation 2 years ago
Blaž Hrastnik 264a455c18
Move terminal out of compositor 2 years ago
Blaž Hrastnik 00d7b18097
This term specific behavior really doesn't belong to compositor 2 years ago
Blaž Hrastnik b2e7171fed
Drop terminal interaction in compositor.size() 2 years ago
Skyler Hawthorne e645804b0a Editor::flush_writes returns an error 2 years ago
Blaž Hrastnik b0212b3611 Deduplicate flush_writes 2 years ago
Blaž Hrastnik 30c93994b5 Use a single save_queue on the editor 2 years ago
Skyler Hawthorne b530a86d1f remove Callback::Compositor variant
To reduce likelihood of accidental discarding of important callbacks
2 years ago
Skyler Hawthorne 57de4e6251 various fixes in write-all path 2 years ago
Skyler Hawthorne e5fd5e2a9c fix panic when view of pending write is closed 2 years ago
Charlie Groves f38ede8631
Add bracketed paste (#3233) 2 years ago
Gokul Soumya 634b6d455f
Add custom event type replacing crossterm's Event (#3169)
Ported over from 61365dfbf3 in the `gui` branch. This will allow
adding our own events, most notably an idle timer event (useful
for adding debounced input in [dynamic pickers][1] used by interactive
global search and workspace symbols).

[1]: https://github.com/helix-editor/helix/pull/3110

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Gokul Soumya 791bf7e50a
Add lsp signature help (#1755)
* Add lsp signature help

* Do not move signature help popup on multiple triggers

* Highlight current parameter in signature help

* Auto close signature help

* Position signature help above to not block completion

* Update signature help on backspace/insert mode delete

* Add lsp.auto-signature-help config option

* Add serde default annotation for LspConfig

* Show LSP inactive message only if signature help is invoked manually

* Do not assume valid signature help response from LSP

Malformed LSP responses are common, and these should not crash the
editor.

* Check signature help capability before sending request

* Reuse Open enum for PositionBias in popup

* Close signature popup and exit insert mode on escape

* Add config to control signature help docs display

* Use new Margin api in signature help

* Invoke signature help on changing to insert mode
2 years ago
Skyler Hawthorne 652cdda833 use test terminal backend for integration tests 2 years ago
Skyler Hawthorne ed950fcc56 Add more context; Editor::open doesn't need to own path 2 years ago
Blaž Hrastnik 5c162ef995
Make regex_prompt directly call cx.push_layer 2 years ago
Gokul Soumya 5c810e5e52
Fix bug with auto replacing components in compositor (#1711)
* Fix bug with auto replacing components in compositor

This was last known to be working with 5995568c at the
time of commit, but now doesn't work with latest rust
stable.

The issue probably stems from using
std::any::type_name() for finding a component in the
compositor, for which the docs explicitly warn against
considering it as a unique identifier for types.

`replace_or_push()` takes a boxed `Component` and
passes it to `find_id()` which compares this with a
bare Component. `type_name()` returns `Box<T>` for
the former and `T` for latter and we have a false
negative. This has been solved by using a generics
instead of trait objects to pass in a `T: Component`
and then use it for comparison.

I'm not exactly sure how this worked fine at the
time of commit of 5995568c; maybe the internal
implementation of `type_name()` changed to properly
indicate indirection with Box.

* Do not compare by type name in compositor find_id
2 years ago
Bram 40eb1268c7
Close some popups automatically (#1285)
* Add Event::Used to use event callback without consuming

* Close popup if contents ignored event

* collect event results before executing callbacks

* don't add new result variant, use Ignored(..) instead

* break in match cases

* Make auto_close configurable

* fix merge

* auto close hover popups

* fix formatting
2 years ago
Gokul Soumya 5995568c1d Prevent multiple code action popups 2 years ago
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
2 years ago
Blaž Hrastnik 3307f44ce2 ui: popup: Don't allow scrolling past the end of content 2 years ago
Kirawi 29c053e84e
Only use a single documentation popup (#1241) 2 years ago
Blaž Hrastnik fa4c59df46 Simplify compositor.find 3 years ago
Blaž Hrastnik 96945be1a8 Fix doctest broken on 2021 edition 3 years ago
Leoi Hung Kin 4d07eaa48b
Prevent LSP Messages from displaying when a prompt is presented (#824)
* Prevent LSP Messages from displaying when a prompt is presented

* use match guard
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
Ivan Tham 821565e4ef Add ctrl-z to suspend 3 years ago
Ivan Tham eba0bbda2e Resume last picker
Inspired by space ' in doom emacs.
3 years ago
Nathan Vegdahl 0b2d51cf5a Fix unused `Result` warnings in helix-term. 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
Joe Neeman d64d75e724 Add some async job infrastructure. 3 years ago
Blaž Hrastnik 90d675fb15 Fix AnyComponent test 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
wojciechkepka cc357d5096 Add progress spinners to status line 3 years ago
Ivan Tham 985625763a Fix doc warnings 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
Blaž Hrastnik 4fd38f82a3 Disable failing doctest 3 years ago
Blaž Hrastnik 6dba1e7ec7 Clippy lint 3 years ago
Blaž Hrastnik c0332bd935 Fix split sizes getting out of sync with the terminal size, refs #69 3 years ago
Jan Hrastnik 78980f575b autoresize terminal in compositor render 3 years ago
Blaž Hrastnik 1255bcb8a3 Simplify the compositor callback. 3 years ago
Blaž Hrastnik 35606a3daa Inline tui as helix-tui fork.
We only rely on some of the rendering primitives and implement our
Cursive-style compositor on top.
3 years ago
Blaž Hrastnik 355ad3cb82 Tokio migration. 3 years ago
Blaž Hrastnik 95d0bba81a ui: Improve completion state handling. 3 years ago
Blaž Hrastnik a24c3fff54 Filter the completion menu based on text entered. 3 years ago
Blaž Hrastnik 2a3910c1d9 wip: Async async. Delay response handling with a callback. 3 years ago