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`.
3 years ago
Wojciech Kępka
14f511da93
Create document if it doesn't exist on save
3 years ago
Blaž Hrastnik
06d8d3f55f
Try to detect language when document file path is set
...
Fixes #91
3 years ago
Blaž Hrastnik
c0332bd935
Fix split sizes getting out of sync with the terminal size, refs #69
4 years ago
Blaž Hrastnik
2100f5a2c0
Address clippy lint.
4 years ago
Blaž Hrastnik
8f6f329057
If switching to a previously open buffer in the same view, keep it's old offset
4 years ago
Blaž Hrastnik
c0a8b81487
Only send the document close event if we're closing the underlying buffer
4 years ago
Blaž Hrastnik
c20813690f
View::new is infallible, so is editor.switch/new_file.
4 years ago
Blaž Hrastnik
f2c79e245b
Allow switching views back to scratch buffers.
4 years ago
Blaž Hrastnik
418ee17b86
Canonicalize the path on open to avoid duplicates.
4 years ago
Blaž Hrastnik
7c915dc065
Add the :new command, don't crash if saving without filename.
4 years ago
Blaž Hrastnik
fd4fd12fa3
clippy lint
4 years ago
Blaž Hrastnik
d00414f81a
Start moving more LSP calls into callbacks/futures without capturing self
4 years ago
Blaž Hrastnik
355ad3cb82
Tokio migration.
4 years ago
Blaž Hrastnik
bc4e54c0c4
Load config files from ~/.config/helix, fallback to defaults.
4 years ago
Blaž Hrastnik
91462af546
Allow starting hx without a file. A new blank file will be created.
4 years ago
Blaž Hrastnik
0dbd5b61ef
Simplify code by providin cx.current() = (view, doc).
4 years ago
Blaž Hrastnik
ceea5eacd8
clippy lint
4 years ago
Blaž Hrastnik
6c4093c946
Weave through view_id references so that views into one file have independent selects.
4 years ago
Blaž Hrastnik
c1f2a14453
view: document.rs cleanup
4 years ago
Blaž Hrastnik
a65395d94b
Load theme from toml file.
4 years ago
Blaž Hrastnik
8657c57cf2
Trivial jumplist implementation.
4 years ago
Blaž Hrastnik
4b176caded
Reset first_line when changing files.
4 years ago
Blaž Hrastnik
8a0ab447ec
editor.open can now either replace the current view or open in a split.
4 years ago
Blaž Hrastnik
b24cdd1295
Derive a separate ViewId type.
4 years ago
Blaž Hrastnik
8328fe926d
Drop refcell use, make view simply ref doc.id.
4 years ago
Blaž Hrastnik
bf95ee27aa
Store Document on the Editor type, make View reference it.
4 years ago
Blaž Hrastnik
cbcacb1063
Merge some imports.
4 years ago
Blaž Hrastnik
8ba1e15d29
Expose doc.syntax() via accessor.
4 years ago
Blaž Hrastnik
51c15da3c3
Hold a reference to executor on the Editor type.
4 years ago
Blaž Hrastnik
e3ec5e31ec
Fix goto code before merging.
4 years ago
Jan Hrastnik
eadad13efa
preparing for gd merge
4 years ago
Jan Hrastnik
4e461bea2f
editor.open now checks if view already exists
4 years ago
Blaž Hrastnik
54a7e893b7
lsp: Wire up didClose notification on editor.close.
4 years ago
Blaž Hrastnik
eca2a73ad0
lsp: Pass through language_id on didOpenTextDocument.
4 years ago
Blaž Hrastnik
dd91090a1a
Implement keep_selections (filter selections on regex).
4 years ago
Blaž Hrastnik
bb87b08fc9
Configure language servers via LanguageConfiguration.
4 years ago
Blaž Hrastnik
8f4ff4c646
editor: We still want to be able to calculate cursor pos.
4 years ago
Blaž Hrastnik
8289bd1cb0
minor, fix clippy lint
4 years ago
Blaž Hrastnik
01907b3497
commands: Implement count for a few more commands.
4 years ago
Blaž Hrastnik
9132c6a591
Make some Document fields read-only.
4 years ago
Blaž Hrastnik
7da6bd6a71
commands: Simplify some code, only calling cx.doc() once.
4 years ago
Blaž Hrastnik
7877647cf0
Allow closing individual views.
4 years ago
Blaž Hrastnik
de5170dcda
Parse input counts: 10w, etc.
4 years ago
Blaž Hrastnik
5e73f83efa
Implement vertical split calculations.
4 years ago
Blaž Hrastnik
8f0ddf9632
Address clippy warnings.
4 years ago
Blaž Hrastnik
446a7e5743
Don't render selections/cursors on views not in focus.
4 years ago
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.
4 years ago
Blaž Hrastnik
05c7fb98df
Refactoring: move language_servers into Editor, proper load for doc.
4 years ago
Blaž Hrastnik
eff6fac9ec
clippy lint
4 years ago