aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
Commit message (Collapse)AuthorAge
* fix test compilationBlaž Hrastnik2022-11-09
|
* Move terminal out of compositorBlaž Hrastnik2022-11-09
|
* This term specific behavior really doesn't belong to compositorBlaž Hrastnik2022-11-09
|
* Drop terminal interaction in compositor.size()Blaž Hrastnik2022-11-09
|
* Re-enable format_selections for a single selection rangeBlaž Hrastnik2022-11-09
|
* Add LSP workspace command picker (#3140)Matthias Deiml2022-11-09
| | | | | | | * Add workspace command picker * Make command typable * Add optional argument to lsp-workspace-command
* `error!` on unknown `CompletionItemKind` (#4658)Marko Klobučar Ledinšćak2022-11-08
|
* Dynamically resize line number gutter width (#3469)Doug Kelkhoff2022-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | * dynamically resize line number gutter width * removing digits lower-bound, permitting spacer * removing max line num char limit; adding notes; qualified successors; notes * updating tests to use new line number width when testing views * linenr width based on document line count * using min width of 2 so line numbers relative is useful * lint rolling; removing unnecessary type parameter lifetime * merge change resolution * reformat code * rename row_styler to style; add int_log resource * adding spacer to gutters default; updating book config entry * adding view.inner_height(), swap for loop for iterator * reverting change of current! to view! now that doc is not needed
* core: Move state into the history moduleBlaž Hrastnik2022-11-08
|
* lsp: Support insertReplaceBlaž Hrastnik2022-11-08
| | | | Fixes #4473
* Fix command-mode completion behavior when input is escapedMichael Davis2022-11-07
| | | | | | | If `a\ b.txt` were a local file, `:o a\ <tab>` would fill the prompt with `:o aa\ b.txt` because the replacement range was calculated using the shellwords-parsed part. Escaping the part before calculating its length fixes this edge-case.
* Escape filenames in command completionMichael Davis2022-11-07
| | | | | | This changes the completion items to be rendered with shellword escaping, so a file `a b.txt` is rendered as `a\ b.txt` which matches how it should be inputted.
* Fix whitespace handling in command-mode completionMichael Davis2022-11-07
| | | | | | | | | | 8584b38cfbe6ffe3e5d539ad953c413e44e90bfa switched to shellwords for completion in command-mode. This changes the conditions for choosing whether to complete the command or use the command's completer. This change processes the input as shellwords up-front and uses shellword logic about whitespace to determine whether the command or argument should be completed.
* Fix range offsets in multi-selection paste (#4608)Michael Davis2022-11-06
| | | | | | | | | | | | | * Fix range offsets in multi-selection paste d6323b7cbc21a9d3ba29738c76581dad93f9f415 introduced a regression with multi-selection paste where pasting would not adjust the ranges correctly. To fix it, we need to track the total number of characters inserted in each changed selection and use that offset to slide each new range forwards. * Inherit selection directions on paste * Add an integration-test for multi-selection pasting
* Fix panic on paste from blackhole register (#4497)Michael Davis2022-11-04
| | | | | The sequence "_y"_p panics because the blackhole register contains an empty values vec. This causes a panic when pasting since it unwraps a `slice::last`.
* Select text inserted by shell or paste (#4458)Michael Davis2022-11-04
| | | | | | | | | This follows changes in Kakoune to the same effects: * p/<space>p: https://github.com/mawww/kakoune/commit/266d1c37d0d970a7eff747f5e6a5773a3cea39d8 * !/<A-!>: https://github.com/mawww/kakoune/commit/85b78dda2e29d70b620836b04224b104426bdbae Selecting the new data inserted by shell or pasting is often more useful than retaining a selection of the pre-paste/insert content.
* Resolve a bunch of upcoming clippy lintsBlaž Hrastnik2022-11-04
|
* Fix panic from two windows editing the same document (#4570)Michael Davis2022-11-03
| | | | | | | | | | | | | | | | | | | | * Clamp highlighting range to be within document This fixes a panic possible when two vsplits of the same document exist and enough lines are deleted from the document so that one of the windows focuses past the end of the document. * Ensure cursor is in view on window change If two windows are editing the same document, one may delete enough of the document so that the other window is pointing at a blank page (past the document end). In this change we ensure that the cursor is within view whenever we switch to a new window (for example with `<C-w>w`). * Update helix-term/src/ui/editor.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Exit select mode on replace commands (#4554)Jonathan LEI2022-11-02
|
* Fix `delete_char_backward` for paired characters (#4558)Yuriy Gabuev2022-11-01
| | | | | | | | | | | When backward-deleting a character, if this character and the following character form a Pair, we want to delete both. However, there is a bug that deletes both characters also if both characters are closers of some Pair. This commit fixes that by adding an additional check that the deleted character should be an opener in a Pair. Closes https://github.com/helix-editor/helix/issues/4544.
* Correctly handle escaping in completion (#4316)Armin Ronacher2022-11-01
| | | | | * Correctly handle escaping in completion * Added escaping tests
* fix: make `scroll` aware of tabs and wide characters (#4519)Matthew Toohey2022-10-29
|
* Make shell_impl concurrent (#3180)Matthias Deiml2022-10-29
|
* fix: Never create automatic doc popups outside of Insert mode (#4456)Poliorcetics2022-10-28
|
* Include colons for typable commands in command palette (#4495)Michael Davis2022-10-28
| | | | | | | | | Before: Goto next buffer. [buffer-next] After: Goto next buffer. [:buffer-next]
* Trim quotes and braces from paths in goto_file_impl (#4370)Dario Oddenino2022-10-28
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* feat(lsp): LSP preselected items appear first in completion menu (#4480)lazytanuki2022-10-27
| | | | | * feat(lsp): LSP preselected items appear first in completion menu * fix: shorter diff
* commands: Make no arg ':theme' show name (#3740)James O. D. Hunt2022-10-26
| | | | | | | | | | | | | | | | Most commands that accept an argument show their current value if no argument is specified. The `:theme` command previously displayed an error message in the status bar if not provided with an argument: ``` Theme name not provided ``` It now shows the current theme name in the status bar if no argument is specified. Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com> Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>
* Add `:update` that will write the changes if the file has been modified. ↵Gaurav Tyagi2022-10-26
| | | | | | | | | (#4426) * add command update that will write the changes if file hasn been modified * add docs * update the docs
* fix: repeating repeat operator (#4450)Michał Zabielski2022-10-26
|
* fix: terminal freezing on `shell_insert_output`GabrielDertoni2022-10-26
| | | | | | | | | | | | | | | | | This bug occurs on `shell_insert_output` and `shell_append_output` commands. The previous implementation would create a child process using the Rust stdlib's `Command` builder. However, when nothing should be piped in from the editor, the default value for `stdin` would be used. According to the Rust stdlib documentation that is `Stdio::inherit` which will make the child process inherit the parent process' stdin. This would cause the terminal to freeze. This change will set the child process' stdin to `Stdio::null` whenever it doesn't pipe it. In the `if` statement where this change was made there was an extra condition for windows that I am not sure if would require some special treatment.
* Render diagnostics in the file picker preview (#4324)Michael Davis2022-10-25
| | | | | This is mostly for the sake of the diagnostics pickers: without rendering the diagnostic styles, it's hard to tell where the entries in the picker are pointing to.
* lsp: Resolve completion items missing documentation on idle (#4406)Michael Davis2022-10-22
| | | | | | | | Some language servers may not send the `documentation` field if it is expensive to compute. Clients can request the missing field with a completionItem/resolve request. In this change we use the idle-timeout event to ensure that the current completion item is resolved.
* nit: Do less allocations in `ui::menu::Item::label` implementationsAlexis (Poliorcetics) Bourget2022-10-21
| | | | | | This complicates the code a little but it often divides by two the number of allocations done by the functions. LSP labels especially can easily be called dozens of time in a single menu popup, when listing references for example.
* nit: move an allocation to happen after a `continue`, making sure it'sAlexis (Poliorcetics) Bourget2022-10-21
| | | | not done for nothing
* fix: write-all crash (#4384)Skyler Hawthorne2022-10-21
| | | | | | | | | | | | | | | | When we do auto formatting, the code that takes the LSP's response and applies the changes to the document are just getting the currently focused view and giving that to the function, basically always assuming that the document that we're applying the change to is in focus, and not in a background view. This is usually fine for a single view, even if it's a buffer in the background, because it's still the same view and the selection will get updated accordingly for when you switch back to it. But it's obviously a problem for when there are multiple views, because if you don't have the target document in focus, it will ask the document to update the wrong view, hence the crash. The problem with this is picking which view to apply any selection change to. In the absence of any more data points on the views themselves, we simply pick the first view associated with the document we are saving.
* Fix unexpected behavior in delete_word_backward and delete_word_forward (#4392)Nimrod2022-10-21
|
* flush writes on force quit (#4397)Skyler Hawthorne2022-10-21
| | | | | | When force quitting, we need to block on the pending writes to ensure that write commands succeed before exiting, and also to avoid a crash when all the views are gone before the auto format call returns from the LS.
* Autosave all when the terminal loses focus (#3178)Charlie Groves2022-10-21
| | | | | | | | | | | * Autosave all when the terminal loses focus * Correct comment on focus config Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Need a block_try_flush_writes in all quit_all paths Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Sort by fixed diagnostics/is_preffered within codeaction categoriesPascal Kuthe2022-10-21
|
* never sort menu items when no fuzzy matching is possiblePascal Kuthe2022-10-21
|
* use permalink to vscode repoPascal Kuthe2022-10-21
|
* use stable sort instead of allocating new vectorsPascal Kuthe2022-10-21
|
* sort autocompletins by fuzzy matchPascal Kuthe2022-10-21
|
* sort codeaction by their kind instead of alphabeticallyPascal Kuthe2022-10-21
|
* chore(view): remove indent_unit helper fn (#4389)Matouš Dzivjak2022-10-20
|
* fix(commands): no last picker error (#4387)Matouš Dzivjak2022-10-20
|
* Merge pull request #2267 from dead10ck/fix-write-failBlaž Hrastnik2022-10-20
|\ | | | | Write path fixes
| * fix tree_sitter_scopesSkyler Hawthorne2022-10-19
| |
| * Editor::flush_writes returns an errorSkyler Hawthorne2022-10-19
| |