aboutsummaryrefslogtreecommitdiff
path: root/helix-term
Commit message (Collapse)AuthorAge
* Add command for resetting diff hunks (#5736)Pascal Kuthe2023-03-08
|
* Handle snippets for LSPs not providing offsets for completionAndrii Grynenko2023-03-08
|
* Render every LSP snippets for every cursorAndrii Grynenko2023-03-08
| | | | | | | This refactors the snippet logic to be largely unaware of the rest of the document. The completion application logic is moved into generate_transaction_from_snippet which is extended to support dynamically computing replacement text.
* Delete snippet placeholders when accepting completionPascal Kuthe2023-03-08
| | | | | | | When accepting a snippet completion we automatically delete the placeholders for now as doing so manual is quite cumbersome. In the future we should keep these as a mark + virtual text that is automatically removed once the cursor moves there.
* Apply snippets as transactionsMichael Davis2023-03-08
|
* Allow LSP server to be stopped (#5964)Davide Galassi2023-03-08
|
* build(deps): bump grep-regex from 0.1.10 to 0.1.11 (#6215)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | | Bumps [grep-regex](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-regex-0.1.10...0.1.11) --- updated-dependencies: - dependency-name: grep-regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump grep-searcher from 0.1.10 to 0.1.11 (#6213)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | | Bumps [grep-searcher](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-searcher-0.1.10...0.1.11) --- updated-dependencies: - dependency-name: grep-searcher dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(dap): implement Restart request (#5651)Filip Dutescu2023-03-06
| | | | | | | | | | | | | | | Add a restart debug session command, which would issue a [Restart Request][1], if the debugger supports it and a session is running. It uses the same arguments and requests used to start the initial session, when recreating it. It builds upon #5532, making use of the changes to the termination workflow of a session. [1]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart Closes: #5594 Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
* Remove centering view from Unimpaired commands (#6193)Santiago Vrancovich2023-03-05
| | | Remove `align_view` calls from `goto_*_diag` as per issue #6177
* Fix lacking space panic (#6109)nuid322023-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix lack of space for popup crash * Fix saturating -> wrapping * Fix wrapping -> saturating (I am an idiot) * Remove useless "mut" in helix-tui/src/buffer.rs Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Remove redundant bound-check * Return bound-check back * Add bound-check for set_style * Remove set_style bound-check * Revert bound-check --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* update MSRV to 1.65Pascal Kuthe2023-03-05
|
* fix: Handle signals before crossterm events (#6170)Alexander Brevig2023-03-05
| | | | | | | | | | | This is a workaround for a freeze when suspending Helix with C-z on non-Windows systems. The check for the keyboard enhancement protocol locks up crossterm's internal event reading/polling system by trying to set up multiple concurrent readers. `input_stream.next()` sets up one reader looking for regular crossterm events while the `supports_keyboard_enhancement` query sets up another looking for internal events. The latter hangs for two seconds or until the former yields an event. By handling signals first we don't lock up the mutex by trying to read keyboard events.
* Fix 'attempt to divide by zero' panic (#6155)nuid322023-03-03
|
* Fix indentation lines (#6134) (#6136)NomisIV2023-03-01
|
* Ignore key-release keyboard events (#6139)Michael Davis2023-03-01
| | | | | Since crossterm 0.26.x, we receive press/release keyboard events on Windows always. We can ignore the release events though to emulate the behavior of keyboard input on Windows on crossterm 0.25.x.
* Add shift-backspace keybind alias for backspace (#4937)lesleyrs2023-02-28
| | | | | | | | | | | When the Kitty Keyboard Protocol is enabled, S-backspace is distinguished from backspace with no modifiers. This is awkward when typing because it's very easy to accidentally hold shift and press backspace temporarily when typing capital letters. Kakoune (which is also a Kitty Keyboard Protocol application) treats S-backspace as backspace too: https://github.com/mawww/kakoune/blob/3150e9b3cd8e61d9bc68245d67822614d4376cf4/src/input_handler.cc#L1275
* Enable the enhanced keyboard protocol if supportedMichael Davis2023-02-28
|
* Update crossterm to 0.26.1Michael Davis2023-02-28
| | | | | Crossterm 0.26.x includes a breaking change for the command to set the cursor shape. This commit includes a change which uses the new type.
* build(deps): bump tempfile from 3.3.0 to 3.4.0 (#6128)dependabot[bot]2023-02-28
| | | | | | | | | | | | | | | | Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/Stebalien/tempfile/releases) - [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS) - [Commits](https://github.com/Stebalien/tempfile/commits) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(nix): update flake to use flake-parts and nci flake-parts moduleYusuf Bera Ertan2023-02-25
|
* fix(dap): validate key and index exist when requesting vars (#5628)Filip Dutescu2023-02-20
| | | | | | | | | | Check if the stack frames contain the thread id and the frame before trying to get the frame id. If case any of the two fails to be found, provide the user with messages to inform them of the issue and gracefully return. Closes: #5625 Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
* feat(dap): send Disconnect if Terminated event received (#5532)Filip Dutescu2023-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Send a `Disconnect` DAP request if the `Terminated` event is received. According to the specification, if the debugging session was started by as `launch`, the debuggee should be terminated alongside the session. If instead the session was started as `attach`, it should not be disposed of. This default behaviour can be overriden if the `supportTerminateDebuggee` capability is supported by the adapter, through the `Disconnect` request `terminateDebuggee` argument, as described in [the specification][discon-spec]. This also implies saving the starting command for a debug sessions, in order to decide which behaviour should be used, as well as validating the capabilities of the adapter, in order to decide what the disconnect should do. An additional change made is handling of the `Exited` event, showing a message if the exit code is different than `0`, for the user to be aware off the termination failure. [discon-spec]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect Closes: #4674 Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
* feat: show current language when no argument is provided (#5895)Guillaume2023-02-16
|
* Replace incorrect usages of tab_width with indent_width. (#5918)Triton1712023-02-16
|
* fix: decode lsp url for workspace_diagnostics_picker (#6016)Erasin2023-02-16
|
* Ignore invalid file URIs from LSP (#6000)Jonathan LEI2023-02-16
|
* ignore case while filtering completions (#6008)Pascal Kuthe2023-02-16
|
* Use Popup::ignore_escape_key helper for completion (#6006)Michael Davis2023-02-16
| | | | | | | | The completion component has a separate branch for handling the Escape key but it can use the `ignore_escape_key` helper added for signature-help instead. This should not cause a behavior change - it's just cleaning up the completion component.
* Fix crash in goto_window_center at EOF (#5987)Pascal Kuthe2023-02-14
|
* feat(ui): deprecated completions (#5932)Matouš Dzivjak2023-02-13
| | | | | | | | | | | | | | | | | | * feat(ui): deprecated completions Mark deprecated completions using strike-through (CROSSED_OUT modifier). The deprection information is taken either from the `deprecated` field of the completion item or from the completion tags. The field seems to be the older way of passing the deprecated information and it was already marked as deprecated for Symbol. In completion item the field is still valid but it seems that the LSP is moving in the general direction of using tags for this kind of information and as such relying on tags as well seems reasonable and future-proof.
* Add :toggle-option command (#4085)A-Walrus2023-02-13
| | | This command toggles the value of boolean options
* Fix completion doc popup area calculation logicGokul Soumya2023-02-11
| | | | | Earlier the doc popup would draw over the compeltion popup itself and sometimes over the cursor too.
* Create popup rect instead of using raw valuesGokul Soumya2023-02-11
|
* Refactor our Markdown construction in completion docGokul Soumya2023-02-11
|
* Rename completion doc popup area variablesGokul Soumya2023-02-11
|
* Use early return in rendering completion docGokul Soumya2023-02-11
|
* Negotiate LSP Position Encoding (#5894)Pascal Kuthe2023-02-11
| | | | | | | So far LSP always required that `PositionEncoding.characters` is an UTF-16 offset. Now that LSP 3.17 is available in `lsp-types` request the server to send char offsets (UTF-32) or byte offsets (UTF-8) instead. For compatability with old servers, UTF-16 remains as the fallback as required by the standard.
* Make `m` textobject look for pairs enclosing selections (#3344)Daniel S Poulin2023-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make `m` textobject look for pairs enclosing selections Right now, this textobject only looks for pairs that surround the cursor. This ensures that the pair found encloses each selection, which is likely to be intuitively what is expected of this textobject. * Simplification of match code Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Adjust logic for ensuring surround range encloses selection Prior, it was missing the case where the start of the selection came before the opening brace. We also had an off-by-one error where if the end of the selection was on the closing brace it would not work. * Refactor to search for the open pair specifically to avoid edge cases * Adjust wording of autoinfo to reflect new functionality * Implement tests for surround functionality in new integration style * Fix handling of skip values * Fix out of bounds error * Add `ma` version of tests * Fix formatting of tests * Reduce indentation levels for readability, and update comments * Preserve each selection's direction with enclosing pair surround * Add test case for multiple cursors resulting in overlap * Mark known failures as TODO * Make tests multi-threaded or they fail * Cargo fmt * Fix typos in integration test comments --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Add exit code to command failed msg (#5898)lesleyrs2023-02-10
|
* Split modification indicator from file statusline elements (#4731)Colton Clemmer2023-02-10
|
* Fix new clippy lints (#5892)Pascal Kuthe2023-02-09
|
* Fix the infinite loop when copying the cursor to the top of the file (#5888)Mike Trinkala2023-02-09
| | | | | | | | | | | Example: ``` test testitem ``` Select line 2 with x, then type Alt-C; Helix will go into an infinite loop. The saturating_sub keeps the head_row and anchor_row pinned at 0, and a selection is never made since the first line is too short.
* Address new clippy lintsBlaž Hrastnik2023-02-09
|
* bump msrv to 1.63 (#5570)Pascal Kuthe2023-02-09
| | | | | * bump msrv to 1.63 * resolve new complex type clippy lints
* Check for external file modifications when writing (#5805)Clément Delafargue2023-02-08
| | | | | | | | `:write` and other file-saving commands now check the file modification time before writing to protect against overwriting external changes. Co-authored-by: Gustavo Noronha Silva <gustavo@noronha.dev.br> Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com> Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
* Select change range for goto_first/last_change commands (#5206)Michael Davis2023-02-07
| | | | | | This matches the behavior from 42ad1a9e043e2e0fb148924ff79b9abbe06907ae but for the first and last change. The selection rules are the same as for goto_next/prev_change: additions and modifications select the added and modified range while deletions are represented with a point.
* enable rendering in integration tests (#5819)Skyler Hawthorne2023-02-04
| | | | | | | | | This will allow testing more of the code base, as well as enable UI- specific testing. Debug mode builds are prohibitively slow for the tests, mostly because of the concurrency write tests. So there is now a profile for integration tests that sets the optimization level to 2 for a few helix crates, and lowers the number of rounds of concurrent writes to 1000.
* Add :character-info command (#4000)William Etheredge2023-02-03
|
* always commit to history when pasting (#5790)Pascal Kuthe2023-02-02
|