Commit graph

514 commits

Author SHA1 Message Date
Blaž Hrastnik
39dc09e6c4 ui: Paginate prompt completion 2021-06-23 21:55:13 +09:00
wojciechkepka
3606d8bd24 Patch the primary cursor with insert and select styles 2021-06-23 21:55:02 +09:00
wojciechkepka
c534fdefdc Refactor, add ui.cursor.primary 2021-06-23 21:55:02 +09:00
wojciechkepka
d70be55f70 Add ability to theme primary selecition 2021-06-23 21:55:02 +09:00
wojciechkepka
ac1e98d088 Add ability to theme cursor 2021-06-23 21:55:02 +09:00
Blaž Hrastnik
9706f1121d Fix small screen panics 2021-06-23 13:13:56 +09:00
Nathan Vegdahl
481c4ba044 Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
2021-06-23 12:43:09 +09:00
Joe Neeman
fd1ae35051 Make the prompt callback take a Context. 2021-06-23 10:03:11 +09:00
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
Blaž Hrastnik
3cee0bf200 Address clippy lint 2021-06-07 23:08:51 +09:00
Benoît CORTIER
68affa3c59 Implement register selection
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`.
2021-06-07 21:52:09 +09:00
Blaž Hrastnik
14830e75ff Revert the line number rendering change, we were correct before 2021-06-07 13:24:03 +09:00
ahkrr
e2d780f993 fix: 2 panics while setting style + off by 1
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
2021-06-07 09:15:08 +09:00
Wojciech Kępka
16b1cfa3be Add diagnostics keybindings 2021-06-07 09:11:52 +09:00
Kevin Sjöberg
3494bb8ef0 Refactor index assignment
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-06-06 21:48:19 +09:00
Kevin Sjöberg
a4ff8cdd8a Allow moving backwards in completions 2021-06-06 21:48:19 +09:00
Kevin Sjöberg
145bc1970a Trigger directory completion upon pressing Enter 2021-06-06 21:48:19 +09:00
Kevin Sjöberg
aa8a8baeeb Calculate offset when moving picker cursor 2021-06-06 19:18:09 +09:00
Kevin Sjöberg
2ac496f919 Do not move past number of matches 2021-06-06 18:04:45 +09:00
ahkrr
c5c3ec07f4 fix: panicked at 'attempt to subtract with overflow'
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
2021-06-06 00:01:16 +09:00
Kirawi
c17dcb8633
Fixing Multiple Panics (#121)
* init

* wip

* wip
2021-06-05 12:49:19 +09:00
Blaž Hrastnik
f2e554d761 matchbrackets: Needs to render with the viewport offset 2021-06-04 15:11:55 +09:00
Ivan Tham
29b9eed33c Fix panic paint mysterious matching pair
When the matching pair is out of bounds it still paints it causing an
out of bound panic. A dirty fix since it still have some issue, at least
it does not panic now.
2021-06-04 09:25:03 +09:00
Jan Hrastnik
c1c3750d38 key is now modified in place at start of handle_event 2021-06-03 23:16:04 +09:00
Jan Hrastnik
daad8ebe12 key_canonicalization now only matches chars 2021-06-03 23:16:04 +09:00
Jan Hrastnik
68abc67ec6 put the key canonicalization in a seperate function. only chars now get stripped of Shift modifier 2021-06-03 23:16:04 +09:00
Jan Hrastnik
712f25c2b9 removed shift matching 2021-06-03 23:16:04 +09:00
notoria
c3a98b6a3e Highlight matching brackets 2021-06-03 11:40:46 +02:00
Blaž Hrastnik
661dbdca57 Fix cursor not showing on (0, 0) 2021-06-03 13:34:00 +09:00
Blaž Hrastnik
c0332bd935 Fix split sizes getting out of sync with the terminal size, refs #69 2021-06-03 10:28:49 +09:00
Blaž Hrastnik
a2147fc7d5 Change help prompt styling 2021-06-01 12:00:25 +09:00
Blaž Hrastnik
87d0617f3b Completion: Format docs tabs & highlight in the doc's native language 2021-05-30 17:13:02 +09:00
Blaž Hrastnik
3810650a6b Completion: Render non-markdown docs too 2021-05-30 10:36:58 +09:00
Blaž Hrastnik
d54ae09d3b ESC should exit both completion and insert mode 2021-05-29 10:37:47 +09:00
Blaž Hrastnik
d708efe275 Fix cursor positioning for prompts 2021-05-29 00:06:23 +09:00
Blaž Hrastnik
3336023614 ui: Menu rendering adjustments 2021-05-28 00:01:17 +09:00
Blaž Hrastnik
094203c74e Update deps, introduce the new tree-sitter lifetimes 2021-05-28 00:00:51 +09:00
Blaž Hrastnik
b114cfa119 Display more data in completion popups. 2021-05-22 17:33:42 +09:00
Blaž Hrastnik
51d1d43289 Double the UI picker file limit. 2021-05-18 17:53:58 +09:00
Blaž Hrastnik
8949347e2c Completion: apply additionalTextEdits.
Used for adding imports to the file when completing.
2021-05-17 16:35:34 +09:00
Blaž Hrastnik
fae2127a11 Drop cx.view_id, it was used before we had cx.current. 2021-05-15 10:50:36 +09:00
Blaž Hrastnik
ccdebb99b5 Drop some useless imports. 2021-05-09 18:32:40 +09:00
Blaž Hrastnik
ff4c1d05de Replace the Clear widget with buffer.clear/clear_with. 2021-05-09 18:13:50 +09:00
Blaž Hrastnik
1255bcb8a3 Simplify the compositor callback. 2021-05-09 18:02:31 +09:00
Blaž Hrastnik
0fe19ae472 clippy lint 2021-05-08 18:26:49 +09:00
Blaž Hrastnik
d24844b73d ui: Render command mode doc text if available. 2021-05-08 17:33:06 +09:00
Blaž Hrastnik
f0712479cb Define text color (mostly) in theme.toml. 2021-05-07 17:42:09 +09:00
Blaž Hrastnik
f87dee926a Simplify prompt autocompletion rendering code. 2021-05-07 17:31:28 +09:00
Blaž Hrastnik
ff84c8e394 Command mode: Per command completers. 2021-05-07 17:19:45 +09:00
Blaž Hrastnik
7c915dc065 Add the :new command, don't crash if saving without filename. 2021-05-07 14:19:58 +09:00
Blaž Hrastnik
fd4fd12fa3 clippy lint 2021-05-06 17:20:00 +09:00
Blaž Hrastnik
355ad3cb82 Tokio migration. 2021-05-06 13:56:34 +09:00
Blaž Hrastnik
3038c2ef6d ui: Draft for completion doc preview. 2021-05-03 18:22:29 +09:00
Blaž Hrastnik
d559199cec Stop crashing if last view is closed. 2021-05-03 17:46:14 +09:00
Blaž Hrastnik
28c167d71d doc: Be smarter about calculating modified status.
This way edit -> undo will properly show up as unmodified.
2021-05-03 17:23:11 +09:00
Blaž Hrastnik
3e5f24a9d5 lsp: support both utf-8 and utf-16 offsets.
Still need to implement the clangd encoding negotiation, but it's
a start. Should also manually override to utf8 for pyls.
2021-04-14 15:39:31 +09:00
Blaž Hrastnik
811f952a41 Center search results. 2021-04-14 15:39:31 +09:00
Blaž Hrastnik
7493d19098 Re-introduce clearing with bg color, seems the TUI issue was fixed. 2021-04-10 00:25:46 +09:00
Blaž Hrastnik
73f4abbb37 N as extend with search (for now, N should be search_prev). 2021-04-10 00:21:13 +09:00
Blaž Hrastnik
978f5114d8 Horizontal scrolling! It only took a year to get around to it. 2021-04-09 19:29:01 +09:00
Blaž Hrastnik
d692390d10 Render current line:col. 2021-04-09 18:57:46 +09:00
Blaž Hrastnik
52da68e49a Render a separator between vertical splits. 2021-04-08 22:34:06 +09:00
Blaž Hrastnik
8b33ba2284 Correct the naming issue with vsplit and hsplit being swapped. 2021-04-08 15:52:04 +09:00
Blaž Hrastnik
f0d49d3ca4 hack: make queries load relative to source dir for now.
We want to provide a runtime dir later on.
2021-04-07 18:05:59 +09:00
Blaž Hrastnik
31e6bcbeb4 Clippy lint: replace with default -> take 2021-04-07 16:58:23 +09:00
Blaž Hrastnik
e8298a398c Fix selection rendering, it would be off by 1 if reverse. 2021-04-07 16:57:58 +09:00
Blaž Hrastnik
0e9ecccfc1 clippy: Drop or-patterns for now because they're not on stable rust yet 2021-04-06 19:51:15 +09:00
Blaž Hrastnik
7c44443994 Handle c-n, c-p, etc. autocompletion events. 2021-04-06 15:34:52 +09:00
Blaž Hrastnik
95d0bba81a ui: Improve completion state handling. 2021-04-05 18:23:37 +09:00
Blaž Hrastnik
cc058ad78f Simplify some code. 2021-04-01 11:04:25 +09:00
Blaž Hrastnik
0dbd5b61ef Simplify code by providin cx.current() = (view, doc). 2021-04-01 11:01:26 +09:00
Blaž Hrastnik
ceea5eacd8 clippy lint 2021-03-31 23:42:16 +09:00
Blaž Hrastnik
6c4093c946 Weave through view_id references so that views into one file have independent selects. 2021-03-31 17:17:01 +09:00
Blaž Hrastnik
1b5316ea74 Track document modified state. 2021-03-30 18:23:12 +09:00
Blaž Hrastnik
88bb7a1f38 Repeat insert command (.). 2021-03-30 18:19:27 +09:00
Blaž Hrastnik
e833d65b77 Teach file picker how to find the project root (.git). 2021-03-30 10:14:50 +09:00
Blaž Hrastnik
8098e9bdcd Allow setting a status message. 2021-03-29 16:47:02 +09:00
Blaž Hrastnik
742b3a709f Store intra-files jumps (goto) on the jumplist. 2021-03-29 16:32:42 +09:00
Blaž Hrastnik
5c2d2fda21 Wire up opening in splits via pickers. 2021-03-29 15:21:48 +09:00
Blaž Hrastnik
aefafc25cd Replace Mode::Goto with just using on_next_key. 2021-03-29 15:04:29 +09:00
Blaž Hrastnik
a24c3fff54 Filter the completion menu based on text entered. 2021-03-27 12:08:44 +09:00
Blaž Hrastnik
2a3910c1d9 wip: Async async. Delay response handling with a callback. 2021-03-26 17:12:45 +09:00
Blaž Hrastnik
ad3325db8e minor: Remove a few unwraps. 2021-03-26 11:03:14 +09:00
Blaž Hrastnik
e3c4edae32 Add the machinery to load syntax config from TOML.
It's embedded into the binary at build time for now, but it's progress.
2021-03-25 15:26:25 +09:00
Blaž Hrastnik
350081a3af Fix crash if pressing enter when nothing selected in completion. 2021-03-24 18:15:42 +09:00
Blaž Hrastnik
915fd9ebaf Restore buffer_picker. 2021-03-24 16:26:53 +09:00
Blaž Hrastnik
8a0ab447ec editor.open can now either replace the current view or open in a split. 2021-03-24 14:28:26 +09:00
Blaž Hrastnik
8328fe926d Drop refcell use, make view simply ref doc.id. 2021-03-23 18:14:35 +09:00
Blaž Hrastnik
3f9a94fd43 ui: markdown: remove trailing blank line. 2021-03-22 23:23:51 +09:00
Blaž Hrastnik
bf95ee27aa Store Document on the Editor type, make View reference it. 2021-03-22 13:53:43 +09:00
Blaž Hrastnik
5e6716c89c Add tab_width and indent_unit config. 2021-03-22 13:53:36 +09:00
Blaž Hrastnik
698e4ddea4 clippy: Factor out a Completion type. 2021-03-22 13:16:56 +09:00
Blaž Hrastnik
cbcacb1063 Merge some imports. 2021-03-22 12:40:07 +09:00
Blaž Hrastnik
a32806b490 Improve completion: src/<tab> will now correctly complete to src/main.rs 2021-03-21 14:13:49 +09:00
Blaž Hrastnik
f29f01858d Implement iter() and len() directly on Selection. 2021-03-19 11:14:13 +09:00
Blaž Hrastnik
c331721565 Finish hiding doc.state / State as an implementation detail. 2021-03-18 15:07:02 +09:00
Blaž Hrastnik
8ba1e15d29 Expose doc.syntax() via accessor. 2021-03-18 14:53:29 +09:00
Blaž Hrastnik
59e6024186 Remove State from a few more signatures. 2021-03-18 14:17:32 +09:00
Blaž Hrastnik
51c15da3c3 Hold a reference to executor on the Editor type. 2021-03-16 23:14:51 +09:00
Blaž Hrastnik
d8599f3a14 ui: Syntax highlight code inside markdown popups. 2021-03-16 16:38:09 +09:00
Blaž Hrastnik
143cfe13e0 minor: TODO comment cleanup 2021-03-16 15:41:42 +09:00
Blaž Hrastnik
081e0ae8ae syntax: highlight_iter always returns Ok() 2021-03-16 13:51:35 +09:00
Blaž Hrastnik
71f899cb5b syntax: Highlight using ropes, avoiding dumping whole doc to string. 2021-03-16 13:47:06 +09:00
Blaž Hrastnik
80eca5c32f ui: Use parsed markdown contents to determine sizing. 2021-03-15 17:55:13 +09:00
Blaž Hrastnik
f9b9bc04cc ui: Account for padding on markdown renderer. 2021-03-15 17:23:42 +09:00
Blaž Hrastnik
872d770753 ui: Restrain diagnostic sidebar w/h based on available area. 2021-03-15 16:25:04 +09:00
Blaž Hrastnik
87e3cd3df2 ui: Render diagnostic errors in sideline. 2021-03-15 16:19:31 +09:00
Blaž Hrastnik
1cf887dea9 Cleanup: use doc.selection() instead of doc.state.selection(). 2021-03-14 17:14:34 +09:00
Blaž Hrastnik
3445abf88e syntax: Hide the TSParser internally, borrowing when needed. 2021-03-13 11:06:02 +09:00
Blaž Hrastnik
b7dd7310c4 syntax: Reuse parser instances. highlight_iter() no longer needs &mut. 2021-03-12 14:46:23 +09:00
Blaž Hrastnik
9dcfe25e4a Use diagnostic.severity to distinguish between error colors. 2021-03-11 16:31:49 +09:00
Blaž Hrastnik
c7ccb432ef pass clippy lint 2021-03-11 16:15:54 +09:00
Blaž Hrastnik
62c991230f find-till (f) prototype, on_next_key mode implementation. 2021-03-11 10:44:38 +09:00
Blaž Hrastnik
8fe4590666 ui: popup: scroll documentation popups with c-u/c-d. 2021-03-08 17:32:13 +09:00
Blaž Hrastnik
ddcf5156c0 ui: menu: Adjust scroll via required_size area caching. 2021-03-08 17:13:45 +09:00
Blaž Hrastnik
5ea610c41d ui: Move terminal into compositor, redo required_size hints. 2021-03-08 17:00:32 +09:00
Blaž Hrastnik
1d42b95915 ui: wip: Markdown doc renderer. 2021-03-05 16:07:46 +09:00
Blaž Hrastnik
dd6db43013 ui: Adjust selection colors. 2021-03-03 17:56:22 +09:00
Blaž Hrastnik
4c6611f96b commands: Stop select_regex from breaking when no matches. 2021-03-03 17:55:56 +09:00
Blaž Hrastnik
a21d96e729 ui: Scrollable popup menu, with scrollbar indicator. 2021-03-03 17:28:50 +09:00
Blaž Hrastnik
513effd972 ui: unsafe theme_ref is no longer needed. 2021-03-03 12:37:30 +09:00
Blaž Hrastnik
bd0f6c1dfc clippy lint 2021-03-02 18:29:15 +09:00
Blaž Hrastnik
0b85c16be9 ui: Share popup code with menu.
Menu is now just wrapped in a popup.
2021-03-02 18:24:24 +09:00
Blaž Hrastnik
11c4e0b053 ui: Calculate popup rendering and sizing. 2021-03-02 17:58:15 +09:00
Blaž Hrastnik
8f4ff4c646 editor: We still want to be able to calculate cursor pos. 2021-03-02 15:44:09 +09:00
Blaž Hrastnik
857bce0e30 ui: Rework command mode, implement file path completion. 2021-03-01 18:02:31 +09:00
Blaž Hrastnik
ec4dd0a176 Add a selection mode again. 2021-03-01 14:31:34 +09:00
Blaž Hrastnik
00808afe3c ui: Make editor more resilient about being shrunk too small. 2021-03-01 14:23:10 +09:00
Blaž Hrastnik
6336c1da20 view: Reposition cursors on tree resize. 2021-02-26 15:53:19 +09:00
Blaž Hrastnik
7162632eb7 lsp: Hover documentation draft. 2021-02-25 18:07:47 +09:00
Blaž Hrastnik
7da6bd6a71 commands: Simplify some code, only calling cx.doc() once. 2021-02-21 19:04:31 +09:00
Blaž Hrastnik
3f6f82b0c4 Always store the log file under home dir. 2021-02-19 16:48:51 +09:00
Blaž Hrastnik
c9dd1c930e treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref 2021-02-18 18:34:22 +09:00
Blaž Hrastnik
9cac44c7c0 minor changes 2021-02-17 17:26:27 +09:00
Blaž Hrastnik
8e1a59c140 ui: Redo selection rendering. 2021-02-17 17:26:27 +09:00
Blaž Hrastnik
83d48f10ea search: Barebones implementation. 2021-02-12 18:10:05 +09:00
Blaž Hrastnik
de5170dcda Parse input counts: 10w, etc. 2021-02-09 16:39:17 +09:00
Blaž Hrastnik
5e73f83efa Implement vertical split calculations. 2021-02-09 15:59:42 +09:00
Blaž Hrastnik
d4b85ce18d popup: wip work on completion popups 2021-02-09 15:40:47 +09:00
Blaž Hrastnik
a924ad2885 simplify. 2021-02-05 16:06:48 +09:00
Blaž Hrastnik
c70080dd68 Work around rendering errors for positions offscreen. 2021-02-05 14:42:56 +09:00
Blaž Hrastnik
a81b8f3e42 Fix statusline rendering, change colors on active view. 2021-02-04 17:24:33 +09:00
Blaž Hrastnik
a014787ee8 Correctly position the real terminal cursor. 2021-02-04 16:50:16 +09:00
Blaž Hrastnik
446a7e5743 Don't render selections/cursors on views not in focus. 2021-02-04 16:49:55 +09:00
Blaž Hrastnik
448c1abba0 View tree implementation: render multiple split views.
Cursors are still a bit buggy and we should render in focus statusbar
differently than in the other pane.
2021-02-03 19:36:54 +09:00
Blaž Hrastnik
2bea5db7bd commands: Implement select_on_matches. 2021-01-22 17:13:14 +09:00
Blaž Hrastnik
05c7fb98df Refactoring: move language_servers into Editor, proper load for doc. 2021-01-21 16:55:46 +09:00
Blaž Hrastnik
777a80917d Address clippy lints. 2021-01-08 16:37:36 +09:00
Blaž Hrastnik
2ab069bb3f lsp: Work on syncing the state with the language server. 2020-12-25 17:20:09 +09:00
Blaž Hrastnik
56f2193811 Retrieve completion options on ctrl-x. 2020-12-23 16:20:49 +09:00
Blaž Hrastnik
d61b4854b8 Make sure to clear the whole screen with the background color. 2020-12-22 16:48:34 +09:00
Blaž Hrastnik
4749b39b88 . 2020-12-22 16:32:15 +09:00
Blaž Hrastnik
47e282804d buffer picker: Mark current view with (*) 2020-12-21 17:58:54 +09:00
Blaž Hrastnik
3d3295bb75 ui: buffer picker on ctrl-b 2020-12-21 16:26:22 +09:00
Blaž Hrastnik
25aa45e76c picker: Factor out file picker, we want to reuse code for other pickers. 2020-12-18 19:19:50 +09:00
Blaž Hrastnik
0b63e838e0 Port over Doc::relative_path. 2020-12-18 17:18:11 +09:00
Blaž Hrastnik
8b263ef04b picker: open file on Enter. 2020-12-18 17:16:04 +09:00
Blaž Hrastnik
edfd3933db picker: Implement fuzzy search. 2020-12-18 16:43:15 +09:00
Blaž Hrastnik
7c75ec04e8 File picker mockup, reuses the line editor work done on Prompt. 2020-12-17 18:08:16 +09:00
Blaž Hrastnik
8f0b28aeb8 Make the select prompt interactive. 2020-12-15 19:29:56 +09:00
Blaž Hrastnik
f92998a14b Prompt needs to close on enter. 2020-12-14 15:59:48 +09:00
Blaž Hrastnik
ca809617b2 Take prompt length into account. 2020-12-14 15:58:03 +09:00
Blaž Hrastnik
ed6a4c4bd2 wip: Use prompt for interactive commands. 2020-12-14 14:12:54 +09:00
Blaž Hrastnik
07801b60bc Remove the prompt on ESC. 2020-12-13 13:57:28 +09:00
Blaž Hrastnik
7dc24a25ba Move ui modules under a ui:: namespace. 2020-12-13 13:44:51 +09:00