aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
Commit message (Collapse)AuthorAge
* make indent/unindent exit select modeRyan Mehri2023-11-18
|
* Add command to move files with LSP support (#8584)Yomain2023-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added rename command * Added an error if the new path already exists * Fixed wrong command name being used * fixed clippy suggestions * removed didRenameFiles call, fixed early return due to path Err * added ':rnm' alias to ':rename' * code cleanup * formatting * removed debug line * cargo fmt * Improved new buffer error message Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de> * Removed unnecessary path normalizing Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de> * feat: change `rename` command to `move` * feat: add multi lsp support when moving files * feat: allow lsp calls with a custom timeout * feat: sending lsp file_changed event once file has moved --------- Co-authored-by: ontley <theontley@gmail.com> Co-authored-by: ontley <67148677+ontley@users.noreply.github.com> Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
* swap yank command registers (#8708)Skyler Hawthorne2023-11-04
| | | | #8703 swapped the `+` and `*` registers, but did not swap them in the corresponding yank commands.
* Only render preview if picker has a preview function (#8667)Ryan Mehri2023-10-30
|
* Add helix-specific ignore files (#8099)Paul Olteanu2023-10-21
|
* Fixed issue when the first file specified as an argument was a relative ↵Bjorn Ove Hay Andersen2023-10-18
| | | | directory (#8520)
* fix(lsp): ensure we only highlight diagnostics for lsp with the feature ↵Yomain2023-10-17
| | | | enabled (#8551)
* Add support for showing all LSPs in --health (#7315)Lorenzo Bellina2023-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for showing all LSPs in --health <lang> * Add support for showing all LSPs in --health languages * Use available/configured in --health languages * Apply @AlexanderBrevig suggestion in --health * Update `--health <language>` Better output (inspired by #8156). Handle the case where no LSPs are configured. * Display all LSPs in `--health languages` instead of x/x Displays all LSPs as a list in the table generated wih `--health languages` * Make check_binary accept Optional references to str Avoids some calls to .clone() * Apply @the-mikedavis suggestions * Avoid useless collecting and cloning * Use for loop instead of .try_for_each()
* Add +N CLI argument to jump to first file's line number (#8521)Bjorn Ove Hay Andersen2023-10-12
| | | | | | | | | | | * Accept +num flag for opening at line number * Update +N argument feature according to feedback in original PR #5603 * Only override the line number of the first file if +N is specified --------- Co-authored-by: Nachum Barcohen <38861757+nabaco@users.noreply.github.com>
* Set the working directory before loading the config (#8498)Bjorn Ove Hay Andersen2023-10-09
|
* enable starting hx with a working directory (#8223)Lloyd Bond2023-10-03
| | | | | | | | | | | | | | | | | * added working path arg to cli and help menu * improve working path cli arg handling * enable hx to set the working path * applied cargo formatting * improved code from cargo clippy suggestion * improved code from follow up review * fix for -w <path> is set but args.files is empty * improved formatting of --help output
* 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
|
* Add `insert-final-newline` config option (#8157)Em Zhan2023-09-12
| | | Co-authored-by: Xalfer <64538944+Xalfer@users.noreply.github.com>
* Add tree-sitter-highlight-name command (#8170)Luke Halasy2023-09-10
| | | | | | | | | | | | | | | * adds treesitter-highlight-name command * commit documentation changes * moves the get_highlight_name function into core/syntax * rename get_highlight_name function to get_highlight_for_node_at_position * addresses pr comments: moves fn into helper fn, simplifies a lot * commit updated documentation changes * changes scope method to return &str so that callers can decide whether or not to own
* fix syntax highlights in dynamic picker (#8206)Pascal Kuthe2023-09-09
|
* add redraw command (#6949)Weiyuan Wu2023-09-08
| | | Co-authored-by: Roberto Vidal <vidal.roberto.j@gmail.com>
* 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
* Maintain the current cursor's position and view in the vsplit/hsplit ↵Lorenzo Bellina2023-09-04
| | | | | | commands too (#8109) Co-authored-by: Benjamin Bouvier <public@benj.me>
* Fix find commands for buffers with non-LF line-endings (#8111)woojiq2023-09-03
|
* 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
* Handle switch from crossterm::Result to io::ResultMichael Davis2023-08-22
|
* create separate timer for redraw requests (#8023)Pascal Kuthe2023-08-21
| | | | | | | | | | | * create separate timer for redraw requests * Update helix-view/src/editor.rs Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* goto_file_impl: use relative path to open file (#7965)Mike2023-08-21
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove unnecessary `Err` from `get_canonicalized_path` (#8009)nkitsaini2023-08-20
| | | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove path completions for `:new` command (#8010)nkitsaini2023-08-20
|
* goto_file: open picker if a directory is selected (#7909)Andrés Cabero2023-08-15
| | | | | * feat: open file picker on directories using goto_file (gf) * remove helper and call to canonicalize
* Make editor remember the latest search register (#5244)Jonathan LEI2023-08-14
|
* Include completions for git-ignored files in debugger prompt (#7936)quantonganh2023-08-14
|
* Fix broken indentation that causes the indentation tests to fail.Daniel Ebert2023-08-11
| | | | | | For some reason, `cargo fmt` does not change the indentation in these places (maybe it isn't sure about what the correct formatting should be).
* Fix YAML auto indentSkyler Hawthorne2023-08-10
| | | | | | | | | YAML indents queries are tweaked to fix auto indent behavior. A new capture type `indent.always` is introduced to address use cases where combining indent captures on a single line is desired. Fixes #6661
* Enhance :toggle to support cycling numbers (#7877)Alex Vinyals2023-08-09
|
* Align view for background buffer opened with `alt-ret` (#7691)woojiq2023-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(picker): `alt-ret' changes cursor pos of current file, not new one Closes #7673 * fix other pickers * symbol pickers * diagnostick pickers This is done using the already patched `jump_to_location` method. * fix global and jumplist pickers * use `view` as old_id; make `align_view` method of `Action` * test(picker): basic <alt-ret> functionality * fix: picker integrational test * fix nit Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* 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
|
* fix range formatting error message typo (#7823)Austin L Wolfgram2023-08-04
|
* 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.
* add node boundary movementSkyler Hawthorne2023-08-01
|
* Add yank_to_clipboard commands, bind to `<space>y` by defaultMichael Davis2023-07-31
| | | | | | | | The clipboard special registers are able to retain multiple selections and also join the value when copying it to the clipboard. So by default we should yank regularly to the '*' and '+' registers. That will have the same behavior for the clipboards but will allow pasting multiple selections if the clipboard doesn't change between yanks.
* Reimplement clipboard commands in terms of special regsMichael Davis2023-07-31
| | | | | | | | | | Since the clipboard provider now lives on the Registers type, we want to eliminate it from the Editor. We can do that and clean up the commands that interact with the clipboard by calling regular yank, paste and replace impls on the clipboard special registers. Eventually the clipboard commands could be removed once macro keybinding is supported.
* 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`.
* commands: Allow using selected register where hardcodedMichael Davis2023-07-31
| | | | | These snippets use hardcoded registers but it can be useful to be able to specify a register for these commands.