Commit Graph

217 Commits (74cc4b4a49e05462b2b543737ad4dc32e2265794)

Author SHA1 Message Date
Gokul Soumya 18beda38ac Add … when chars are truncated in picker 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
Gokul Soumya fb8e7dc25b Fix picker item width overflow
Fixes #352
3 years ago
Blaž Hrastnik 39dc09e6c4 ui: Paginate prompt completion 3 years ago
wojciechkepka 3606d8bd24 Patch the primary cursor with insert and select styles 3 years ago
wojciechkepka c534fdefdc Refactor, add `ui.cursor.primary` 3 years ago
wojciechkepka d70be55f70 Add ability to theme primary selecition 3 years ago
wojciechkepka ac1e98d088 Add ability to theme cursor 3 years ago
Blaž Hrastnik 9706f1121d Fix small screen panics 3 years ago
Nathan Vegdahl 481c4ba044 Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
3 years ago
Joe Neeman fd1ae35051 Make the prompt callback take a Context. 3 years ago
Lionel Flandrin b56174d738 Implement change_current_directory command 3 years ago
Blaž Hrastnik 20f33ead67 minor: Remove old TODOs 3 years ago
Blaž Hrastnik a70de6e980
Merge pull request #224 from helix-editor/line_ending_detection
Line ending detection
3 years ago
wojciechkepka cc357d5096 Add progress spinners to status line 3 years ago
wojciechkepka b2804b14b1 Add a `Spinner` 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
wojciechkepka fc39a6c40d Add comment, statusline + commandline = 2 3 years ago
wojciechkepka 0882712b45 Use full screen size 3 years ago
wojciechkepka 980e602352 Make completion window move to top when cursor is below half 3 years ago
Nathan Vegdahl 5d22e3c4e5 Misc fixes and clean up of line ending detect code. 3 years ago
Blaž Hrastnik 34ebe82654 ui: prompt: Add more keymappings 3 years ago
Blaž Hrastnik e9a3245aae Re-export unicode crates from helix_core 3 years ago
Blaž Hrastnik 9275021497 ui: prompt: Better unicode support
We copied over eval_movement from wezterm, that already solves most of
our problems. self.cursor is now byte-based.
3 years ago
wojciechkepka 2d629a880c Fix overflow 3 years ago
wojciechkepka a2db161d5a Add theme completer 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 1c1474c3b8 Add `ui.statusline.inactive`, use `ui.statusline` for statusline text 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
Benoît CORTIER 42142cf680 Fix panic when entering unicode in command prompt
It was attempted to use `String::insert` and `String::remove` to insert
without taking care of unicodes.

Fixes https://github.com/helix-editor/helix/issues/282
3 years ago
Benoît CORTIER 8664d70e73 Replace `Editor::current` by a macro
This is necessary to workaround ownership issues across function calls.
The issue notably arised when implementing the registers into `Editor`
and I was getting annoyed again when implementing copy/pasting into
system clipboard.
The problem is addressed by using macro calls instead of function calls.
There is no notable side effect.
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 a4f5a0134e trying out line ending helper functions in commands.rs 3 years ago
Jan Hrastnik 3756c21bae rebase on branch line_ending_detection 3 years ago
Gokul Soumya d1c8a74771 Add theme key for selected line number
Adds `ui.linenr.selected` which controls highlight of linu numbes which
have cursors on.

- Fallback to linenr if linenr.selected is missing

- Update docs and themes

- Add TODOs for themes with temporary linenr.selected
3 years ago
Ivan Tham 124514aa70 Add cursor kind to separate hidden cursor from pos
Now IME cursor position should be correct since we can still set cursor
position without drawing the cursor.
3 years ago
Benoît CORTIER 6bdf609caa Remove RwLock for registers
Registers are stored inside `Editor` and accessed without `RwLock`.
To work around ownership, I added a sister method to `Editor::current`:
`Editor::current_with_context`. I tried to modify `Editor::current`
directly but it's used at a lot of places so I reverted into this for
now at least.
3 years ago
Benoît CORTIER 6fb2d2679d Use `_impl` suffix instead of `_` prefix
Helpers / internal implementations where using the `_` prefix.
However, this prefix also suppress unused warnings.
I suggest we use the `_impl` suffix instead.
3 years ago
Ivan Tham 002f1ad397 Add filter ability to picker
Inspired by doom emacs. Able to filter picker options multiple times.
3 years ago
Nathan Vegdahl 4faf1d3bf4 Remove indent style status-line display for now. 3 years ago
Nathan Vegdahl 358ea6a37c Implement command to change the indent-style setting of a document. 3 years ago
Nathan Vegdahl 8648e483f7 Render indent-style status in status line.
Also cleaned up the status line code a little.
3 years ago
Ivan Tham 1bda454149 Add ctrl-w for prompt 3 years ago
Gokul Soumya f33aaba53f Add ui.selection to theme.toml
Enables changing the color of the selection which was previously
hard coded.
3 years ago
Blaž Hrastnik d545e61644 ui: Prompt should figure out a reasonable column width
Fixes #192
Refs #225
3 years ago
Wojciech Kępka d8b5d1181f Add `Copy` derive to `PromptEvent` 3 years ago