aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/document.rs
Commit message (Collapse)AuthorAge
* Make Document's format API a little nicer.Joe Neeman2021-06-30
|
* Make formatting happen asynchronously.Joe Neeman2021-06-30
|
* Detect file language before file indent style.Nathan Vegdahl2021-06-26
| | | | | | | Fixes #378. The issue was that because indent style detection ran before language detection, there was no language indent style to fall back on if indent style detection failed, so it would just default to 2 spaces.
* Move helix-view/tests/*txt files to txts subdirectory (#372)teenjuna2021-06-25
| | | | | * Move helix-view/tests/*txt files to txts subdirectory * Rename tests/txts to tests/encoding
* Fix previous broken refactor key into helix-viewIvan Tham2021-06-24
| | | | | | | | Need to be used for autoinfo Revert "Revert "Refactor key into helix-view"" This reverts commit 10f9f72232f5789323d689bf0f9cd359715770d6.
* add missing docShafkath Shuhan2021-06-23
|
* Handle non-UTF8 filesShafkath Shuhan2021-06-23
|
* Fix flipped condition where Helix adds a line ending on open.Nathan Vegdahl2021-06-23
|
* Add surround keybindsGokul Soumya2021-06-22
|
* Add function to get the line ending of a str slice.Nathan Vegdahl2021-06-21
| | | | This is needed in some places.
* Don't need getters/setters for line_ending property.Nathan Vegdahl2021-06-21
| | | | | It's plain-old-data. If we want to do fancier things later, it's easy to switch back.
* Merge branch 'master' of github.com:helix-editor/helix into ↵Nathan Vegdahl2021-06-20
|\ | | | | | | | | | | | | line_ending_detection Rebasing was making me manually fix conflicts on every commit, so merging instead.
| * Fix doc warningsIvan Tham2021-06-20
| |
| * Add ability to change theme on editorwojciechkepka2021-06-19
| |
| * Revert "Refactor key into helix-view"Blaž Hrastnik2021-06-19
| | | | | | | | | | | | Did not use defaults when custom keymap was used This reverts commit ca806d4f852e934651132fc9570a6110e30f646d.
* | Work on moving code over to LineEnding instead of assuming '\n'.Nathan Vegdahl2021-06-20
| | | | | | | | Also some general cleanup and some minor fixes along the way.
* | Misc fixes and clean up of line ending detect code.Nathan Vegdahl2021-06-20
| |
* | changed some hardcoded newlines, removed a else if in line_ending.rsJan Hrastnik2021-06-19
| |
* | Merge remote-tracking branch 'origin/master' into line_ending_detectionJan Hrastnik2021-06-19
|\|
| * Refactor key into helix-viewIvan Tham2021-06-19
| | | | | | | | Now also make use of Deserialize for Config.
| * Add `work_done_token` as parameter to lsp methodswojciechkepka2021-06-18
| |
| * Fix expansion of `~` (#284)Wojciech Kępka2021-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | * Fix expansion of `~`, dont use directory relative to cwd. * Add `expand_tilde` * Bring back `canonicalize_path`, use `expand_tilde` to `normalize` * Make `:open ~` completion work * Fix clippy * Fold home dir into tilde in Document `realitve_path`
| * Configurable keys 2 (Mapping keys to commands) (#268)PabloMansanet2021-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add convenience/clarity wrapper for Range initialization * Add keycode parse and display methods * Add remapping functions and tests * Implement key remapping * Add remapping book entry * Use raw string literal for toml * Add command constants * Make command functions private * Map directly to commands * Match key parsing/displaying to Kakoune * Formatting pass * Update documentation * Formatting * Fix example in the book * Refactor into single config file * Formatting * Refactor configuration and add keymap newtype wrappers * Address first batch of PR comments * Replace FromStr with custom deserialize
* | applied changes from pr reviewJan Hrastnik2021-06-17
| |
* | fixed some problems from rebasingJan Hrastnik2021-06-16
| |
* | doc.line_ending() now returns &'static strJan Hrastnik2021-06-16
| |
* | trying out line ending helper functions in commands.rsJan Hrastnik2021-06-16
| |
* | added some tests and a line_ending helper function in document.rsJan Hrastnik2021-06-16
| |
* | added more changes from pr review for line_ending_detectionJan Hrastnik2021-06-16
| |
* | resolved conflict in rebaseJan Hrastnik2021-06-16
| |
* | ran cargo clippy and cargo fmtJan Hrastnik2021-06-16
| |
* | rebase on branch line_ending_detectionJan Hrastnik2021-06-16
|/
* Cosmetic changes and better comments for the indent auto-detect code.Nathan Vegdahl2021-06-15
|
* Address PR comments.Nathan Vegdahl2021-06-15
| | | | | | - Move char functions into their own module under helix_core. - Use matches!() macro where appropriate. - Use a static lifetime on indent_unit() now that we can.
* Render indent-style status in status line.Nathan Vegdahl2021-06-15
| | | | Also cleaned up the status line code a little.
* Fix clippy warnings.Nathan Vegdahl2021-06-15
|
* Attempt to auto-detect indentation style on document load.Nathan Vegdahl2021-06-15
| | | | This also moves the primary indentation-style setting into Document.
* `Document::is_modified` should not check if path is setWojciech Kępka2021-06-13
| | | | If there is a new document we still want to know if there are unsaved changes
* 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>
* Derive debug without featureIvan Tham2021-06-10
| | | | Note that this also removed those `finish_non_exhaustive()`.
* Implement Debug for data structure as a featurenotoria2021-06-10
|
* Don't panic on empty documentKevin Sjöberg2021-06-09
|
* Add missing newline to end of file on loadIvan Tham2021-06-08
| | | | Fix #152
* Add diagnostics keybindingsWojciech Kępka2021-06-07
|
* Add a comment to `canonicalize_path`Wojciech Kępka2021-06-06
|
* Add a TODOWojciech Kępka2021-06-06
|
* Create document if it doesn't exist on saveWojciech Kępka2021-06-06
|
* Try to detect language when document file path is setBlaž Hrastnik2021-06-04
| | | | Fixes #91
* Fix undo redoIvan Tham2021-06-03
| | | | | | I missed the fast return. Fix #89
* Improve on the fix for deleting from the end of the buffer.Jakub Bartodziej2021-06-03
|