aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
Commit message (Collapse)AuthorAge
* Scroll cursor and page together (neovim-like scrolling) (#8015)AlexanderDickie2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * neovim like scroll function * clear line annotations outside of move_vertically/_visual * add nvim scroll function to commands * assign nvim-scroll to C-d and C-u (half page scrolls) * dont remove backspace and space mapping * move non-softwrap logic to seperate function, call this in nvim-scroll fn * Revert "move non-softwrap logic to seperate function, call this in nvim-scroll fn" This reverts commit e4905729c338a2260e6981f1d8fac022897b4191. * Revert "clear line annotations outside of move_vertically/_visual" This reverts commit 1df3fefe55afc840d1ab5094b2116d1127fc363f. * add TODO for when inline diagnostics gets merged * move nvim-scroll logic into scroll(), dont respect scrolloff * run cargo fmt * run cargo clippy * update documenation for Ctrl-d and Ctrl-u remap
* Allow numbers as second input event (#8471)Mehdi Abedi2024-02-14
| | | | | | | | | | | | | | | * Make sure pending key list is empty when count handling This will allow using numbers as second key event. * count handling; add an exception for 'g' * Lookup the key event before considering a number as count * Avoid the allocation of another vec for the pending keys --------- Co-authored-by: x <x@torrent>
* fix lsp config reload (#9415)kyfanc2024-02-13
| | | | | | | | `syn_loader` was replaced rather than interior value being replace, old value was still being referenced and not updated after `:config-refresh`. By using `ArcSwap` like for `config`, each `.load()` call will return the most updated value. Co-authored-by: kyfan <kyfan@email>
* Fix scroll track (#9508)ath32024-02-09
|
* Fix pulldown_cmark breaking changes to tag typesMichael Davis2024-02-07
| | | | | | | * Tags and TagEnd are now separate enums since <https://redirect.github.com/raphlinus/pulldown-cmark/pull/517>. * The `Tag::Heading` member has been changed from a tuple variant to a struct variant.
* fix division by zero when prompt completion area is too small (#9524)Diego2024-02-06
|
* refactor completion and signature help using hooksPascal Kuthe2024-01-23
|
* Add hook/event systemPascal Kuthe2024-01-23
|
* Create helix-stdx crate for stdlib extensionsMichael Davis2024-01-18
| | | | | | | | | | | | | helix-stdx is meant to carry extensions to the stdlib or low-level dependencies that are useful in all other crates. This commit starts with all of the path functions from helix-core and the CWD tracking that lived in helix-loader. The CWD tracking in helix-loader was previously unable to call the canonicalization functions in helix-core. Switching to our custom canonicalization code should make no noticeable difference though since `std::env::current_dir` returns a canonicalized path with symlinks resolved (at least on unix).
* Address clippy lints (#9371)Daniel Sedlak2024-01-17
|
* Initialize diagnostics when opening a document (#8873)Philipp Mildenberger2024-01-09
|
* update history of a newly focused view (#9271)Pascal Kuthe2024-01-09
|
* Support drawing popup frame (#4313)ath32023-12-19
| | | Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* fix(ui): use crossterm cursor when at the end of the rope (#8934)Hendrik Norkowski2023-11-28
|
* use crossterm cursor in editor when out of focus (#6858)Hendrik Norkowski2023-11-27
| | | Use crossterm cursor in the editor when the terminal is out of focus to achieve consistent out-of-focus cursor behaviour
* Fix precedence of ui.virtual.whitespace (#8879)chtenb2023-11-25
| | | | | | | | | * Revert "Revert "Fix precedence of ui.virtual.whitespace (#8750)"" This reverts commit 811d62d3b3699efb7b7ceb362f537979e5911871. * Fix ui.text overwriting the syntax highlighting Adjust ui.text description
* Revert "Fix precedence of ui.virtual.whitespace (#8750)"Blaž Hrastnik2023-11-22
| | | | This reverts commit 41b307b673a34183123585d63746cb756c1779ed.
* Fix precedence of ui.virtual.whitespace (#8750)chtenb2023-11-22
|
* Only render preview if picker has a preview function (#8667)Ryan Mehri2023-10-30
|
* Add helix-specific ignore files (#8099)Paul Olteanu2023-10-21
|
* fix(lsp): ensure we only highlight diagnostics for lsp with the feature ↵Yomain2023-10-17
| | | | enabled (#8551)
* markdown: Recognize `<code>` tags with attributes as code (#8397)Michael Davis2023-09-26
|
* Style Bold/Italic/Strikethrough markdown in docs (#8385)A-Walrus2023-09-25
| | | | | * Style Bold/Italic/Strikthrough markdown in docs * Flatten to single match
* correctly center items in picker previewPascal Kuthe2023-09-14
|
* fix crash in picker preview for invalid rangesPascal Kuthe2023-09-14
|
* fix syntax highlights in dynamic picker (#8206)Pascal Kuthe2023-09-09
|
* Fix Clone definition for Injector (#8194)Michael Davis2023-09-07
|
* Don't use word splitting during fuzzy matching (#8192)Pascal Kuthe2023-09-06
|
* Do not show (running) when opening picker (#8148)Pascal Kuthe2023-09-06
| | | | | | | | | | | * only stream from background thread if necessary If the file transversal is longer shorter 30ms it will now be performed on the main thread. Spawning a thread can take a while (or rather it takes a while until that thread is scheduled) so the files can actually take a while to show up. This prevents the `(running)` indicator from briefly showing up when opening the file picker in a small directory. * run partial cargo update
* avoid excessive memory consumption in picker (#8127)Pascal Kuthe2023-09-01
| | | | | | | | | | | * avoid excessive memory consumption from file picker * fix typos Co-authored-by: Chris <75008413+cd-a@users.noreply.github.com> --------- Co-authored-by: Chris <75008413+cd-a@users.noreply.github.com>
* Clear completion when switching windows via click (#8118)Michael Davis2023-08-31
| | | | | | | | | | | | | | | | | The completion component assumes that it operates on the same View but it's possible to break this assumption by switching windows through left-clicking. I believe we should clear the completion menu when switching windows to fix this. This change fixes a panic for this scenario: * Open a buffer with LSP completion available * Split the window (for example '<C-w>v') * Enter insert mode and trigger the completion menu * Select a completion candidate (for example with '<C-n>') * Switch to the original window by left-clicking in its area * Enter insert mode and make edits (for example 'o<backspace>') This will trip the 'assert_eq' in Document::restore.
* transition to nucleo for fuzzy matching (#7814)Pascal Kuthe2023-08-30
| | | | | | | | | | | | | | | | | | * transition to nucleo for fuzzy matching * drop flakey test case since the picker streams in results now any test that relies on the picker containing results is potentially flakely * use crates.io version of nucleo * Fix typo in commands.rs Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com> --------- Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>
* fix: line numbers remain relative when helix loses focus (#7955)woojiq2023-08-29
| | | | | | | * fix: line numbers remain relative when helix loses focus If `line number = relative` and a new window is opened in helix, lines inside unfocused windows will be `absolute`. This commit adds the same thing when helix becomes unfocused in a terminal emulator. * partial rebase
* Remove unnecessary `Err` from `get_canonicalized_path` (#8009)nkitsaini2023-08-20
| | | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Include completions for git-ignored files in debugger prompt (#7936)quantonganh2023-08-14
|
* Show whether file readonly in statusline (#7740)Connortsui202023-08-08
|
* Center the picker preview selection using visual lines (#7837)Jesse Luehrs2023-08-08
| | | | this way the preview always shows the selection even if lines were wrapped
* Skip rendering gutters when gutter width exceeds view width (#7821)Anshul Dalal2023-08-08
|
* feat: smart_tabSkyler Hawthorne2023-08-01
| | | | | | Implement `smart_tab`, which optionally makes the tab key run the `move_parent_node_start` command when the cursor has non- whitespace to its left.
* Preview the latest value for regular registersMichael Davis2023-07-31
| | | | | | | | | | | | | | | | | | | | | | | This fixes a discrepancy between regular registers which are used for yanking multiple values (for example via `"ay`) and regular registers that store a history of values (for example `"a*`). Previously, the preview shown in `select_register`'s infobox would show the oldest value in history. It's intuitive and useful to see the most recent value pushed to the history though. We cannot simply switch the preview line from `values.first()` to `values.last()`: that would fix the preview for registers used for history but break the preview for registers used to yank multiple values. We could push to the beginning of the values with `Registers::push` but this is wasteful from a performance perspective. Instead we can have `Registers::read` return an iterator that returns elements in the reverse order and reverse the values in `Register::write`. This effectively means that `push` adds elements to the beginning of the register's values. For the sake of the preview, we can switch to `values.last()` and that is then correct for both usage- styles. This also needs a change to call-sites that read the latest history value to switch from `last` to `first`.
* Use refactored Registers typeMichael Davis2023-07-31
| | | | | | | This is an unfortunately noisy change: we need to update virtually all callsites that access the registers. For reads this means passing in the Editor and for writes this means handling potential failure when we can't write to a clipboard register.
* Reformat with nightly rustfmt for better let-else formatting (#7721)Philipp Mildenberger2023-07-27
|
* highlighted_code_block: Take input text as &strMichael Davis2023-07-27
| | | | | | This removes a handful of allocations for functions calling into the function, which is nice because the prompt may call this function on every keypress.
* Prefer RopeSlice to &Rope in helix_core::syntaxMichael Davis2023-07-27
| | | | | | | | | | | | | | | Pascal and I discussed this and we think it's generally better to take a 'RopeSlice' rather than a '&Rope'. The code block rendering function in the markdown component module is a good example for how this can be useful: we can remove an allocation of a rope and instead directly turn a '&str' into a 'RopeSlice' which is very cheap. A change to prefer 'RopeSlice' to '&Rope' whenever the rope isn't modified would be nice, but it would be a very large diff (around 500+ 500-). Starting off with just the syntax functions seems like a nice middle-ground, and we can remove a Rope allocation because of it. Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
* Tune regex highlights for usage in promptsMichael Davis2023-07-27
| | | | | | | | | | | Since regex is almost always injected into other languages, `pattern_character`s will inherit the highlight for the structure that injects them (for example `/foo/` in JavaScript or `~r/foo/` in Elixir). This removes the string highlight when used in the prompt. We also add `ERROR` node highlighting so that errors in regex syntax appear in the prompt. This resolves a TODO in the `regex_prompt` function about highlighting errors in the regex.
* Syntax-highlight regex promptsMichael Davis2023-07-27
| | | | | | | | | | | We can use tree-sitter-regex highlighting in prompts for entering regexes, like `search` or `global_search`. The `highlighted_code_block` function from the markdown component makes this a very small change. This could be improved in the future by leaving the parsed syntax tree on the prompt, allowing incremental updates. Prompt lines are usually so short though and tree-sitter-regex is rather small and uncomplicated, so that improvement probably wouldn't make a big difference.
* Save an undo checkpoint before accepting completion (#7747)Michael Davis2023-07-27
|
* Clear statusline while prompt is visible (#7646)Pascal Kuthe2023-07-17
|
* Fix crash when cwd is deleted (#7185)Yomain2023-07-11
|
* make TS matching fallback to plaintextPascal Kuthe2023-06-22
|