Lionel Flandrin
b56174d738
Implement change_current_directory command
2021-06-22 19:20:51 -04:00
Blaž Hrastnik
20f33ead67
minor: Remove old TODOs
2021-06-22 23:26:34 +09:00
Blaž Hrastnik
a70de6e980
Merge pull request #224 from helix-editor/line_ending_detection
...
Line ending detection
2021-06-22 11:09:19 +09:00
wojciechkepka
cc357d5096
Add progress spinners to status line
2021-06-21 12:59:06 +09:00
wojciechkepka
b2804b14b1
Add a Spinner
2021-06-21 12:59:06 +09:00
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.
2021-06-20 16:09:14 -07:00
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.
2021-06-20 15:33:02 -07:00
wojciechkepka
fc39a6c40d
Add comment, statusline + commandline = 2
2021-06-20 19:59:26 +09:00
wojciechkepka
0882712b45
Use full screen size
2021-06-20 19:59:26 +09:00
wojciechkepka
980e602352
Make completion window move to top when cursor is below half
2021-06-20 19:59:26 +09:00
Nathan Vegdahl
5d22e3c4e5
Misc fixes and clean up of line ending detect code.
2021-06-20 00:40:41 -07:00
Blaž Hrastnik
34ebe82654
ui: prompt: Add more keymappings
2021-06-20 16:38:58 +09:00
Blaž Hrastnik
e9a3245aae
Re-export unicode crates from helix_core
2021-06-20 16:38:58 +09:00
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.
2021-06-20 16:38:58 +09:00
wojciechkepka
2d629a880c
Fix overflow
2021-06-19 16:49:20 -04:00
wojciechkepka
a2db161d5a
Add theme completer
2021-06-20 00:07:13 +09:00
wojciechkepka
ce97a2f05f
Add ability to change theme on editor
2021-06-20 00:07:13 +09:00
Blaž Hrastnik
10f9f72232
Revert "Refactor key into helix-view"
...
Did not use defaults when custom keymap was used
This reverts commit ca806d4f85
.
2021-06-19 23:59:19 +09:00
Jan Hrastnik
cdd9347457
Merge remote-tracking branch 'origin/master' into line_ending_detection
2021-06-19 14:51:53 +02:00
Ivan Tham
ca806d4f85
Refactor key into helix-view
...
Now also make use of Deserialize for Config.
2021-06-19 16:37:15 +09:00
wojciechkepka
1c1474c3b8
Add ui.statusline.inactive
, use ui.statusline
for statusline text
2021-06-18 15:18:58 -04:00
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`
2021-06-18 15:19:34 +09:00
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
2021-06-18 10:08:32 +09:00
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.
2021-06-18 09:38:10 +09:00
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
2021-06-17 20:08:05 +09:00
Jan Hrastnik
a4f5a0134e
trying out line ending helper functions in commands.rs
2021-06-16 17:13:41 +02:00
Jan Hrastnik
3756c21bae
rebase on branch line_ending_detection
2021-06-16 17:00:21 +02:00
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
2021-06-16 15:00:14 +09:00
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.
2021-06-15 23:46:21 +08:00
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.
2021-06-15 23:01:56 +08:00
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.
2021-06-15 02:33:12 -04:00
Ivan Tham
002f1ad397
Add filter ability to picker
...
Inspired by doom emacs. Able to filter picker options multiple times.
2021-06-15 12:00:31 +08:00
Nathan Vegdahl
4faf1d3bf4
Remove indent style status-line display for now.
2021-06-14 18:32:23 -07:00
Nathan Vegdahl
358ea6a37c
Implement command to change the indent-style setting of a document.
2021-06-14 18:32:23 -07:00
Nathan Vegdahl
8648e483f7
Render indent-style status in status line.
...
Also cleaned up the status line code a little.
2021-06-14 18:32:23 -07:00
Ivan Tham
1bda454149
Add ctrl-w for prompt
2021-06-15 01:06:53 +09:00
Gokul Soumya
f33aaba53f
Add ui.selection to theme.toml
...
Enables changing the color of the selection which was previously
hard coded.
2021-06-15 00:06:53 +09:00
Blaž Hrastnik
d545e61644
ui: Prompt should figure out a reasonable column width
...
Fixes #192
Refs #225
2021-06-13 22:28:18 +09:00
Wojciech Kępka
d8b5d1181f
Add Copy
derive to PromptEvent
2021-06-13 20:48:18 +09:00
Wojciech Kępka
b500a2a138
commands: Add more write commands
2021-06-13 20:48:18 +09:00
Ivan Tham
1953588873
Change picker horizontal split to h
...
Follow window mode and vim behavior, x seemed weird.
2021-06-12 21:17:48 +09:00
wojciechkepka
4dbc23ff1c
Fix documentation popup panic
2021-06-10 11:26:03 +09:00
Kevin Sjöberg
b20e4a108c
Only enforce limit outside of .git
2021-06-09 10:06:31 +09:00
Kevin Sjöberg
1bb9977faf
Match keybindings of menu
2021-06-09 09:54:22 +09:00
Kevin Sjöberg
29962a5bd9
Fix Shift-Tab for moving upwards in menu
2021-06-09 09:53:40 +09:00
Blaž Hrastnik
83723957fe
Fix crash when too many completions available
...
Refs #81
2021-06-08 21:58:26 +09:00
Zheming Li
ae51065213
Support go to line 1
2021-06-08 17:27:21 +09:00
Wojciech Kępka
1bffb34350
Make matching bracket dimmed, prevent out of bounds rendering
2021-06-08 17:23:05 +09:00
Kevin Sjöberg
08f50310bd
Bump file picker limit
2021-06-08 09:51:50 +09:00
Wojciech Kępka
6fc0e0b5fb
completion: Fix unimplemented autocomplete
2021-06-08 09:38:53 +09:00