aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
Commit message (Collapse)AuthorAge
* Only auto-format for certain languagesBlaž Hrastnik2021-06-12
| | | | | Fixes #53 Fixes #207
* Add :earlier and :later commands that can be used to navigate the full edit ↵Jakub Bartodziej2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | history. (#194) * Disable deleting from an empty buffer which can cause a crash. * Improve on the fix for deleting from the end of the buffer. * Clean up leftover log. * Avoid theoretical underflow. * Implement :before which accepts a time interval and moves the editor to the closest history state to the commit of the current time minus that interval. Current time is now by default, or the commit time if :before has just been used. * Add :earlier an :later commands that can move through the edit history and retrieve changes hidded by undoing and commiting new changes. The commands accept a number of steps or a time period relative to the currrent change. * Fix clippy lint error. * Remove the dependency on parse_duration, add a custom parser instead. * Fix clippy errors. * Make helix_core::history a public module. * Use the helper for getting the current document and view. * Handled some PR comments. * Fix the logic in :later n. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Add an alias for :earlier. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Add an alias for later. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Run cargo fmt. * Add some tests for earlier and later. * Add more tests and restore the fix for later that diappeared somehow. * Use ? instead of a match on an option. Co-authored-by: Ivan Tham <pickfire@riseup.net> * Rename to UndoKind. * Remove the leftover match. * Handle a bunch of review comments. * More systemd.time compliant time units and additional description for the new commands. * A more concise rewrite of the time span parser using ideas from PR discussion. * Replace a match with map_err(). Co-authored-by: Ivan Tham <pickfire@riseup.net> Co-authored-by: Jakub Bartodziej <jqb@google.com> Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Movement fixes, refactor and unit test suite (#217)PabloMansanet2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add convenience/clarity wrapper for Range initialization * Test horizontal moves * Add column jumping tests * Add failing movement conditions for multi-word moves * Refactor skip_over_next * Add complex forward movement unit tests * Add strict whitespace checks and edge case tests * Restore formatting * Remove unused function * Add empty test case for deletion and fix nth_prev_word_boundary * Add tests for backward motion * Refactor word movement * Address review comments and finish refactoring backwards move * Finish unit test suite * Fmt pass * Fix lint erors * Clean up diff restoring bad 'cargo fmt' actions * Simplify movement closures (thanks Pickfire) * Fmt pass * Replace index-based movement with iterator based movement, ensuring that each move incurs a single call to the RopeSlice API * Break down tuple function * Extract common logic to all movement functions * Split iterator helpers away into their own module * WIP reducing clones * Operate on spans * WIP simplifying iterators * Simplify motion helpers * Fix iterator * Fix all unit tests * Refactor and simplify * Simplify fold
* commands: Handle `t<ENTER>` as till newlineWojciech Kępka2021-06-11
|
* lsp: Display LSP progress messages (#216)Wojciech Kępka2021-06-11
|
* move to first nonwhitespace on shift-iRobin van Dijk2021-06-10
| | | | This matches the behaviour in vim and kak
* Fix jump behavior, goto_implementation now jumpIvan Tham2021-06-10
| | | | | Better jump behavior since we override the first jump if it's on the first document. At the same time, ctrl-i is now working with gd jumps.
* Fix documentation popup panicwojciechkepka2021-06-10
|
* Only enforce limit outside of .gitKevin Sjöberg2021-06-09
|
* Match keybindings of menuKevin Sjöberg2021-06-09
|
* Fix Shift-Tab for moving upwards in menuKevin Sjöberg2021-06-09
|
* Fix crash when too many completions availableBlaž Hrastnik2021-06-08
| | | | Refs #81
* Support go to line 1Zheming Li2021-06-08
|
* Make `r<ENTER>` workWojciech Kępka2021-06-08
|
* Remove unwanted `as_str`Wojciech Kępka2021-06-08
|
* Don't replace newlinesWojciech Kępka2021-06-08
|
* Add bounds checks to replaceWojciech Kępka2021-06-08
|
* commands: Replace all characters in selectionWojciech Kępka2021-06-08
|
* Make matching bracket dimmed, prevent out of bounds renderingWojciech Kępka2021-06-08
|
* Cleanup find_first_non_whitespace_char funcsWojciech Kępka2021-06-08
|
* commands: Add goto first non-whitespace char of lineWojciech Kępka2021-06-08
|
* Fix Unicode (#135)Kirawi2021-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * wip * wip * fix unicode break * fix unicode break * Update helix-core/src/transaction.rs Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu> * clippy * fix * add changes * added test * wip * wip * wip * wip * fix * fix view * fix #88 Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
* Bump file picker limitKevin Sjöberg2021-06-08
|
* Update keymapWojciech Kępka2021-06-08
|
* commands: Add replace with yanked as `R`Wojciech Kępka2021-06-08
|
* completion: Fix unimplemented autocompleteWojciech Kępka2021-06-08
|
* ui: completion: Use the correct type_nameBlaž Hrastnik2021-06-07
| | | | Fixes #166
* Create all parent directories for config and cacheWojciech Kępka2021-06-07
|
* Make gh/gl extend selection in select modeBlaž Hrastnik2021-06-07
|
* Address clippy lintBlaž Hrastnik2021-06-07
|
* Disable failing doctestBlaž Hrastnik2021-06-07
|
* Separate helix-term as a libraryIvan Tham2021-06-07
| | | | helix-term stuff will now be documented in rustdoc.
* Implement register selectionBenoît CORTIER2021-06-07
| | | | | | User can select register to yank into with the " command. A new state is added to `Editor` and `commands::Context` structs. This state is managed by leveraging a new struct `RegisterSelection`.
* lsp: Provide workspace root on client.initialize()Blaž Hrastnik2021-06-07
|
* Revert the line number rendering change, we were correct beforeBlaž Hrastnik2021-06-07
|
* View mode: Use saturating_sub when calculating first_colBlaž Hrastnik2021-06-07
|
* commands: use chars().count() over .len() on stringsBlaž Hrastnik2021-06-07
|
* fix: 2 panics while setting style + off by 1ahkrr2021-06-07
| | | | | | | | | | | | The panics would occur because set_style would draw outside of the the surface. Both occured using `find_prev` or `till_prev` In my case the first panic! would appear in a terminal with around 80 columns in helix/README.md going to the end of the file with `geglf(` the second with `geglfX` The off by one fix ensures that `find_nth_prev` starts at the first character to the left
* Install instructions and version number corrections (#148)Ethan Bodzioney2021-06-07
| | | | | | | | | | | | | | | | | | | * Add MacOS install instructions * Change version name argument When using the -V command to get the version you are given 'helix-term x.x.x', I changed this to just helix as it makes more sense. * Fixed version number * Fixed version number * Fixed version number * Fixed version number * Fixed version number * Fixed version number
* Add diagnostics keybindingsWojciech Kępka2021-06-07
|
* Add spc w w for window modeIvan Tham2021-06-07
|
* Refactor index assignmentKevin Sjöberg2021-06-06
| | | | Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Allow moving backwards in completionsKevin Sjöberg2021-06-06
|
* Trigger directory completion upon pressing EnterKevin Sjöberg2021-06-06
|
* Add ctrl-w in insert modeIvan Tham2021-06-06
| | | | | It seemed to panic when I pressed too many times, but that is from lsp side.
* Calculate offset when moving picker cursorKevin Sjöberg2021-06-06
|
* Do not move past number of matchesKevin Sjöberg2021-06-06
|
* Add window modeIvan Tham2021-06-06
| | | | Fix #93
* fix: panicked at 'attempt to subtract with overflow' ahkrr2021-06-05
| | | | helix-term/src/ui/editor.rs:275:29 This would happen when the window-size was to small to display the entire width and one would start jumping forwards with f<some_char> and the beginning of the highlighted area would end up outside of the window
* fix: make find_prev_char and till_prev_char workahkrr2021-06-05
| | | | | | Bevore this PR `commands::find_prev_char` and `commands::till_prev_char` were triggerable through keys but `seach::find_nth_next()` was hardcoded in `_find_char`. The passed `fn` was nerver used. With this PR the passed `fn` is used. The change in search.rs resolves an off by one error in the behivor of `find_nth_prev`