Commit Graph

124 Commits (e1c9f132637bcf2406c7c1403ab3d8dfd882369e)

Author SHA1 Message Date
Kirawi 16bf8e1e6b
Document more of document.rs (#562) 3 years ago
Gokul Soumya d84f8b5fde
Show file preview in split pane in fuzzy finder (#534)
* Add preview pane for fuzzy finder

* Fix picker preview lag by caching

* Add picker preview for document symbols

* Cache picker preview per document instead of view

* Use line instead of range for preview doc

* Add picker preview for buffer picker

* Fix render bug and refactor picker

* Refactor picker preview rendering

* Split picker and preview and compose

The current selected item is cloned on every event, which is
undesirable

* Refactor out clones in previewed picker

* Retrieve doc from editor if possible in filepicker

* Disable syntax highlight for picker preview

Files already loaded in memory have syntax highlighting enabled

* Ignore directory symlinks in file picker

* Cleanup unnecessary pubs and derives

* Remove unnecessary highlight from file picker

* Reorganize buffer rendering

* Use normal picker for code actions

* Remove unnecessary generics and trait impls

* Remove prepare_for_render and make render mutable

* Skip picker preview if screen small, less padding
3 years ago
Blaž Hrastnik f0eb6ed96a Resolve a couple TODOs 3 years ago
Blaž Hrastnik 557c63033c fix: Map all selections on transaction.apply 3 years ago
Nathan Vegdahl f88d4c1e20 Move indent-style code into `helix_core::indent`. 3 years ago
Nathan Vegdahl e191a75e33 Give default document a single line ending. 3 years ago
Nathan Vegdahl cd7302ffd3 Enforce cursor/selection invariants in one place.
Rather than per-command like before.
3 years ago
Nathan Vegdahl 43594049dd Merge branch 'master' into great_line_ending_and_cursor_range_cleanup 3 years ago
Shafkath Shuhan 25103833b2 mark reloaded buffers as unchanged 3 years ago
Nathan Vegdahl 198fe40951 Don't insert a final line ending on file load/reload. 3 years ago
Nathan Vegdahl a77274e8bb Merge branch 'master' into great_line_ending_and_cursor_range_cleanup 3 years ago
Kirawi 0b1ed8656d
Fix #442 (#446)
* fix #442

fix #442

fmt

* create Rope from default line ending

* Fix use of encoding in Document::open()
3 years ago
Nathan Vegdahl 85d5b399de Merge branch 'master' into great_line_ending_and_cursor_range_cleanup 3 years ago
Blaž Hrastnik fc34efea12 appease clippy 3 years ago
Blaž Hrastnik 48481db8ca fix: Make path absolute before normalizing
:open ../file.txt failed before because .. would be stripped
3 years ago
Blaž Hrastnik b72c6204e5 fix: When calculating relative path, expand tilde last 3 years ago
Kirawi c5b2973739
`:reload` (#374)
* reloading functionality

* fn with_newline_eof()

* fmt

* wip

* wip

* wip

* wip

* moved to core, added simd feature for encoding_rs

* wip

* rm

* .gitignore

* wip

* local wip

* wip

* wip

* no features

* wip

* nit

* remove simd

* doc

* clippy

* clippy

* address comments

* add indentation & line ending change
3 years ago
Nathan Vegdahl 28627f97e9 Fix empty document test. 3 years ago
Nathan Vegdahl 7961a13007 Make new documents empty, rather than starting with a line ending. 3 years ago
Nathan Vegdahl 22dca3b111 Allow last line in file to lack a line break character. 3 years ago
Nathan Vegdahl 7c7be6d583 Make `Selection`'s normalize and transform methods self-consuming only. 3 years ago
Nathan Vegdahl 0ae522f3df Clean up `Selection` to not use so many allocations. 3 years ago
Joe Neeman 2902a10a3e Make Document's format API a little nicer. 3 years ago
Joe Neeman c9be480bf8 Make formatting happen asynchronously. 3 years ago
Nathan Vegdahl d534d6470f Detect file language before file indent style.
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.
3 years ago
teenjuna c688288881
Move helix-view/tests/*txt files to txts subdirectory (#372)
* Move helix-view/tests/*txt files to txts subdirectory

* Rename tests/txts to tests/encoding
3 years ago
Ivan Tham 10548bf0e3 Fix previous broken refactor key into helix-view
Need to be used for autoinfo

Revert "Revert "Refactor key into helix-view""

This reverts commit 10f9f72232.
3 years ago
Shafkath Shuhan 6564257a7b add missing doc 3 years ago
Shafkath Shuhan fd98e743e8 Handle non-UTF8 files 3 years ago
Nathan Vegdahl 0cbaa998ce Fix flipped condition where Helix adds a line ending on open. 3 years ago
Gokul Soumya 13648d28b9 Add surround keybinds 3 years ago
Nathan Vegdahl 07e28802f6 Add function to get the line ending of a str slice.
This is needed in some places.
3 years ago
Nathan Vegdahl 714002048c Don't need getters/setters for line_ending property.
It's plain-old-data.  If we want to do fancier things later, it's
easy to switch back.
3 years ago
Nathan Vegdahl e686c3e462 Merge branch 'master' of github.com:helix-editor/helix into line_ending_detection
Rebasing was making me manually fix conflicts on every commit, so
merging instead.
3 years ago
Nathan Vegdahl 4efd6713c5 Work on moving code over to LineEnding instead of assuming '\n'.
Also some general cleanup and some minor fixes along the way.
3 years ago
Ivan Tham 985625763a Fix doc warnings 3 years ago
Nathan Vegdahl 5d22e3c4e5 Misc fixes and clean up of line ending detect code. 3 years ago
Jan Hrastnik 701eb0dd68 changed some hardcoded newlines, removed a else if in line_ending.rs 3 years ago
wojciechkepka ce97a2f05f Add ability to change theme on editor 3 years ago
Blaž Hrastnik 10f9f72232 Revert "Refactor key into helix-view"
Did not use defaults when custom keymap was used

This reverts commit ca806d4f85.
3 years ago
Jan Hrastnik cdd9347457 Merge remote-tracking branch 'origin/master' into line_ending_detection 3 years ago
Ivan Tham ca806d4f85 Refactor key into helix-view
Now also make use of Deserialize for Config.
3 years ago
wojciechkepka a6d39585d8 Add `work_done_token` as parameter to lsp methods 3 years ago
Wojciech Kępka 41b07486ad
Fix expansion of `~` (#284)
* 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`
3 years ago
Jan Hrastnik 8bccd6df30 applied changes from pr review 3 years ago
PabloMansanet f7e00cf720
Configurable keys 2 (Mapping keys to commands) (#268)
* 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
3 years ago
Jan Hrastnik 9c3eadb2e4 fixed some problems from rebasing 3 years ago
Jan Hrastnik 7cf0fa05a4 doc.line_ending() now returns &'static str 3 years ago
Jan Hrastnik a4f5a0134e trying out line ending helper functions in commands.rs 3 years ago
Jan Hrastnik a9a718c3ca added some tests and a line_ending helper function in document.rs 3 years ago