Nathan Vegdahl
d5534a6d10
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
2021-07-20 13:35:37 -07:00
Ivan Tham
17f9dfce7e
Fix typo
2021-07-20 22:10:43 +09:00
Nathan Vegdahl
b0311f4fc2
Fixed primary cursor position calculation to use 1-width semantics.
...
This had a bunch of knock-on effects that were buggy, such as bracket
match highlighting.
2021-07-19 09:25:10 -07:00
Nathan Vegdahl
079d4ed86d
Properly fix last_line
view calculation.
...
Turned out to be simpler than I thought. Didn't even need to change the
other use-sites.
2021-07-19 08:39:48 -07:00
Nathan Vegdahl
a77274e8bb
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
2021-07-17 10:49:03 -07:00
Cor
9fcbbfa467
Changed startup behaviour to only open a single view when multiple files are specified on the commandline.
...
Changed the behaviour; the first argument on the commandline is the file on display
2021-07-18 00:29:05 +09:00
Kirawi
0b1ed8656d
Fix #442 ( #446 )
...
* fix #442
fix #442
fmt
* create Rope from default line ending
* Fix use of encoding in Document::open()
2021-07-15 11:22:34 +09:00
Blaž Hrastnik
d530d6e39d
Further simplify error handling in :commands
2021-07-11 16:36:36 +09:00
Lionel Flandrin
9c02a1b070
Make command implementation return a Result<()>
...
The error message is displayed with cx.editor.set_error.
2021-07-11 16:36:20 +09:00
Nathan Vegdahl
85d5b399de
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
2021-07-05 20:27:49 -07:00
Blaž Hrastnik
fc34efea12
appease clippy
2021-07-05 10:34:48 +09:00
Blaž Hrastnik
48481db8ca
fix: Make path absolute before normalizing
...
:open ../file.txt failed before because .. would be stripped
2021-07-05 10:26:51 +09:00
Blaž Hrastnik
b72c6204e5
fix: When calculating relative path, expand tilde last
2021-07-05 10:17:26 +09:00
Ivan Tham
916362d3a9
Info box add horizontal padding
2021-07-04 18:01:59 +09:00
Ivan Tham
5977b07e19
Reduce calculation and improve pattern in infobox
...
- switch to use static OnceCell to calculate Info once
- pass Vec<(&[KeyEvent], &str)> rather than Vec<(Vec<KeyEvent>, &str)>
- expr -> tt to allow using | as separator, make it more like match
2021-07-04 18:01:59 +09:00
Ivan Tham
9effe71b7d
Apply suggestions from blaz for infobox
2021-07-04 18:01:59 +09:00
Ivan Tham
8985c58fd3
Add infobox
2021-07-04 18:01:59 +09:00
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
2021-07-02 23:54:50 +09:00
Nathan Vegdahl
28627f97e9
Fix empty document test.
2021-07-02 00:06:53 -07:00
Nathan Vegdahl
7961a13007
Make new documents empty, rather than starting with a line ending.
2021-07-01 23:39:49 -07:00
Nathan Vegdahl
22dca3b111
Allow last line in file to lack a line break character.
2021-07-01 23:36:09 -07:00
Nathan Vegdahl
7c7be6d583
Make Selection
's normalize and transform methods self-consuming only.
2021-07-01 14:22:28 -07:00
Nathan Vegdahl
0ae522f3df
Clean up Selection
to not use so many allocations.
2021-07-01 14:22:28 -07:00
Jakub Bartodziej
79f096963c
Color palettes ( #393 )
...
* Enable using color palettes in theme files.
* Add an example theme defined using a gruvbox color palette.
* Fix clippy error.
* Small style improvement.
* Add documentation for the features to themes.md.
* Update runtime/themes/gruvbox.toml
Fix the value of purple0.
Co-authored-by: DrZingo <DrZingo@users.noreply.github.com>
Co-authored-by: DrZingo <DrZingo@users.noreply.github.com>
2021-06-30 23:24:30 +09:00
Kirawi
acaf22d005
Added native Windows clipboard support ( #373 )
...
* Added native Windows clipboard support
* make conditional
wip
better conditional
wip
wip
wip
wip
make conditional
2021-06-30 17:11:56 +09:00
Joe Neeman
2902a10a3e
Make Document's format API a little nicer.
2021-06-30 17:08:50 +09:00
Joe Neeman
c9be480bf8
Make formatting happen asynchronously.
2021-06-30 17:08:50 +09:00
Blaž Hrastnik
057bd630d8
Simplify selection rendering by injecting highlight scopes
2021-06-27 23:28:22 +09:00
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.
2021-06-25 20:27:43 -04:00
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
2021-06-25 15:59:06 +09:00
Blaž Hrastnik
8e277ad8ba
fix: crossterm -> input key conversion
2021-06-25 13:13:15 +09:00
Keith Simmons
4418e17547
reverse the dependency between helix-tui and helix-view ( #366 )
...
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view
* fix tests
* clippy and format fixes
Co-authored-by: Keith Simmons <keithsim@microsoft.com>
2021-06-25 12:58:15 +09:00
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
.
2021-06-25 00:39:03 +09:00
Shafkath Shuhan
6564257a7b
add missing doc
2021-06-23 15:40:27 +09:00
Shafkath Shuhan
fd98e743e8
Handle non-UTF8 files
2021-06-23 15:40:27 +09:00
Nathan Vegdahl
0cbaa998ce
Fix flipped condition where Helix adds a line ending on open.
2021-06-23 12:43:09 +09:00
Gokul Soumya
13648d28b9
Add surround keybinds
2021-06-22 14:27:51 +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
Nathan Vegdahl
07e28802f6
Add function to get the line ending of a str slice.
...
This is needed in some places.
2021-06-21 10:29:29 -07:00
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.
2021-06-21 09:52:21 -07:00
Blaž Hrastnik
994ff4b269
Don't run wl-copy with --foreground
...
It stalls the hx process
2021-06-21 19:06:57 +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
Ivan Tham
985625763a
Fix doc warnings
2021-06-20 23:13:36 +08:00
Benoît CORTIER
a2b8cfca34
Add system clipboard yank and paste commands
...
This commit adds six new commands to interact with system clipboard:
- clipboard-yank
- clipboard-yank-join
- clipboard-paste-after
- clipboard-paste-before
- clipboard-paste-replace
- show-clipboard-provider
System clipboard provider is detected by checking a few environment
variables and executables. Currently only built-in detection is
supported.
`clipboard-yank` will only yank the "main" selection, which is currently the first
one. This will need to be revisited later.
Closes https://github.com/helix-editor/helix/issues/76
2021-06-20 23:25:53 +09:00
wojciechkepka
0882712b45
Use full screen size
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
Jan Hrastnik
701eb0dd68
changed some hardcoded newlines, removed a else if in line_ending.rs
2021-06-20 01:24:36 +02:00
wojciechkepka
6825e19509
Only reconfiure highlights when setting theme
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
wojciechkepka
f424a61054
Add themes loader
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
c5a2fd5da3
Add close_language_servers
method on Editor
2021-06-19 13:02:56 +09:00
wojciechkepka
a6d39585d8
Add work_done_token
as parameter to lsp methods
2021-06-18 17:42:38 +09: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
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
Jan Hrastnik
8bccd6df30
applied changes from pr review
2021-06-17 13:49:50 +02: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
9c3eadb2e4
fixed some problems from rebasing
2021-06-16 17:22:55 +02:00
Jan Hrastnik
7cf0fa05a4
doc.line_ending() now returns &'static str
2021-06-16 17:13:44 +02:00
Jan Hrastnik
a4f5a0134e
trying out line ending helper functions in commands.rs
2021-06-16 17:13:41 +02:00
Jan Hrastnik
a9a718c3ca
added some tests and a line_ending helper function in document.rs
2021-06-16 17:11:16 +02:00
Jan Hrastnik
9c419fe05c
added more changes from pr review for line_ending_detection
2021-06-16 17:08:46 +02:00
Jan Hrastnik
5eb6918392
resolved conflict in rebase
2021-06-16 17:05:14 +02:00
Jan Hrastnik
17f69a03e0
ran cargo clippy and cargo fmt
2021-06-16 17:00:30 +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
Nathan Vegdahl
ecb39da3e0
Cosmetic changes and better comments for the indent auto-detect code.
2021-06-14 18:32:23 -07:00
Nathan Vegdahl
0a5580aa21
Address PR comments.
...
- Move char functions into their own module under helix_core.
- Use matches!() macro where appropriate.
- Use a static lifetime on indent_unit() now that we can.
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
Nathan Vegdahl
5ca043c17a
Fix clippy warnings.
2021-06-14 18:32:23 -07:00
Nathan Vegdahl
2329512122
Attempt to auto-detect indentation style on document load.
...
This also moves the primary indentation-style setting into Document.
2021-06-14 18:32:23 -07:00
Wojciech Kępka
d008e86037
Document::is_modified
should not check if path is set
...
If there is a new document we still want to know if there are unsaved changes
2021-06-13 20:48:18 +09:00
Robin
44cc0d8eb0
add alternate file ( #223 )
...
* add alternate file
inspired by vim ctrl-6/kak ga commands. the alternate file is kept per view
* apply feedback from #223
* rename to last_accessed
* add ga doc
* add fail message for ga
2021-06-12 21:21:06 +09:00
Jakub Bartodziej
69fe46a122
Add :earlier and :later commands that can be used to navigate the full edit history. ( #194 )
...
* Disable deleting from an empty buffer which can cause a crash.
* Improve on the fix for deleting from the end of the buffer.
* Clean up leftover log.
* Avoid theoretical underflow.
* Implement :before which accepts a time interval and moves the editor to
the closest history state to the commit of the current time minus that
interval. Current time is now by default, or the commit time if :before
has just been used.
* Add :earlier an :later commands that can move through
the edit history and retrieve changes hidded by undoing
and commiting new changes. The commands accept a number
of steps or a time period relative to the currrent change.
* Fix clippy lint error.
* Remove the dependency on parse_duration, add a custom parser instead.
* Fix clippy errors.
* Make helix_core::history a public module.
* Use the helper for getting the current document and view.
* Handled some PR comments.
* Fix the logic in :later n.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Add an alias for :earlier.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Add an alias for later.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Run cargo fmt.
* Add some tests for earlier and later.
* Add more tests and restore the fix for later that diappeared somehow.
* Use ? instead of a match on an option.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Rename to UndoKind.
* Remove the leftover match.
* Handle a bunch of review comments.
* More systemd.time compliant time units and additional description for the new commands.
* A more concise rewrite of the time span parser using ideas from PR discussion.
* Replace a match with map_err().
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: Jakub Bartodziej <jqb@google.com>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-06-11 22:06:13 +09:00
Wojciech Kępka
098806ce2a
lsp: Display LSP progress messages ( #216 )
2021-06-11 12:42:16 +09:00
notoria
9887b1275a
Implement missing Debug and update Cargo.lock
2021-06-10 22:00:08 +09:00
Ivan Tham
7cc13fefe9
Derive debug without feature
...
Note that this also removed those `finish_non_exhaustive()`.
2021-06-10 22:00:08 +09:00
notoria
1a3a924634
Implement Debug for data structure as a feature
2021-06-10 22:00:08 +09:00
Ivan Tham
6b3c9d8ed3
Fix jump behavior, goto_implementation now jump
...
Better jump behavior since we override the first jump if it's on the
first document. At the same time, ctrl-i is now working with gd jumps.
2021-06-10 11:08:18 +08:00
Kevin Sjöberg
7ef0e2cab6
Don't panic on empty document
2021-06-09 09:43:21 +09:00
Zheming Li
ae51065213
Support go to line 1
2021-06-08 17:27:21 +09:00
Kirawi
b873fb9897
Fix Unicode ( #135 )
...
* init
* wip
* wip
* fix unicode break
* fix unicode break
* Update helix-core/src/transaction.rs
Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
* clippy
* fix
* add changes
* added test
* wip
* wip
* wip
* wip
* fix
* fix view
* fix #88
Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
2021-06-08 13:20:15 +09:00
Ivan Tham
82fdfdc38e
Add missing newline to end of file on load
...
Fix #152
2021-06-08 11:38:56 +09:00
Egor Karavaev
960bc9f134
Don't panic on LSP not starting
2021-06-08 10:02:41 +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
Wojciech Kępka
16b1cfa3be
Add diagnostics keybindings
2021-06-07 09:11:52 +09:00
Ingrid
54f3548d54
theme: Enable style modifiers in theme.toml, add Ingrid's theme ( #113 )
...
* theme: Enable style modifiers in theme.toml
* docs: theme documentation
* fixup: parse modifiers with filter_map
* theme: tests for parse_style
* theme: Log invalid cases in theme.toml parse
* docs: theme documentation fixup
* docs: Blaz's theming comments
* docs: Theme doc fixes from pickfire
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* theme: More context in logs, TODO for alerting users
* contrib: Ingrid's theme
* docs: Theme subsection fixes
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-06-06 21:45:59 +09:00
Wojciech Kępka
bcb1afeb4c
Add a comment to canonicalize_path
2021-06-06 17:28:09 +08:00
Wojciech Kępka
de946d2357
Add a TODO
2021-06-06 17:28:09 +08:00
Wojciech Kępka
14f511da93
Create document if it doesn't exist on save
2021-06-06 17:28:09 +08:00
Kirawi
c17dcb8633
Fixing Multiple Panics ( #121 )
...
* init
* wip
* wip
2021-06-05 12:49:19 +09:00
Blaž Hrastnik
06d8d3f55f
Try to detect language when document file path is set
...
Fixes #91
2021-06-04 11:03:40 +09:00
Ivan Tham
e6132f0acd
Fix undo redo
...
I missed the fast return.
Fix #89
2021-06-04 01:27:09 +09:00
Jakub Bartodziej
3c5dfb0633
Improve on the fix for deleting from the end of the buffer.
2021-06-03 23:23:23 +09:00
Jakub Bartodziej
6cbc0aea92
Disable deleting from an empty buffer which can cause a crash.
2021-06-03 23:23:23 +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
Rowan Herbert
1b67fae9f4
Fix panic when buffer larger than terminal width
2021-06-02 16:30:40 -07:00
Ivan Tham
f5f46b1fed
Separate document history into Cell
...
As history is used separately from the rest of the edits, separating it
can avoid needless borrowing and cloning. But one need to be aware later.
2021-06-02 23:47:50 +08:00
Blaž Hrastnik
ce25aa951e
Allow setting a filepath on :write
2021-06-01 17:26:03 +09:00
Blaž Hrastnik
2c48d65b15
Format document on save
2021-05-30 00:00:15 +09:00
Blaž Hrastnik
2100f5a2c0
Address clippy lint.
2021-05-17 23:01:45 +09:00
Blaž Hrastnik
8f6f329057
If switching to a previously open buffer in the same view, keep it's old offset
2021-05-17 16:36:13 +09:00
Blaž Hrastnik
4a9d1163e0
Hacky way to specify indent scopes per language via toml configs.
...
Can't do it via a scm query nicely because it returns an iterator over
all the matches, whereas we want to traverse the tree ourselves.
Can't extract the pattern data from a parsed query either.
Oh well, toml files for now.
2021-05-14 19:21:46 +09:00
Blaž Hrastnik
c0a8b81487
Only send the document close event if we're closing the underlying buffer
2021-05-07 14:52:47 +09:00
Blaž Hrastnik
c20813690f
View::new is infallible, so is editor.switch/new_file.
2021-05-07 14:45:49 +09:00
Blaž Hrastnik
f2c79e245b
Allow switching views back to scratch buffers.
2021-05-07 14:36:37 +09:00
Blaž Hrastnik
418ee17b86
Canonicalize the path on open to avoid duplicates.
2021-05-07 14:30:23 +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
d00414f81a
Start moving more LSP calls into callbacks/futures without capturing self
2021-05-06 15:08:59 +09:00
Blaž Hrastnik
355ad3cb82
Tokio migration.
2021-05-06 13:56:34 +09:00
Blaž Hrastnik
b0bdcab970
doc: Note about diagnostic mapping.
2021-05-03 17:47:48 +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
b5b650cfe7
Fix the last line calculation inside ensure_cursor_in_view
2021-04-14 17:15:32 +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
180521fefe
Adjust scroll() to match kakoune: only scroll the view if cursor in bounds.
2021-04-14 14:27:47 +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
52da68e49a
Render a separator between vertical splits.
2021-04-08 22:34:06 +09:00
Blaž Hrastnik
9f318a8529
Fix an issue with closing nested splits.
...
The parent id was never assigned to the split, so removing the container
when it became empty failed.
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
bc4e54c0c4
Load config files from ~/.config/helix, fallback to defaults.
2021-04-07 23:56:20 +09:00
Blaž Hrastnik
91462af546
Allow starting hx without a file. A new blank file will be created.
2021-04-06 19:02:22 +09:00
Blaž Hrastnik
cf7b19d711
Always update selection: Empty transactions can still change selections.
2021-04-06 17:29:39 +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
15c9a33ebc
Drop doc.state. Use doc.text + doc.selections.
2021-03-31 23:23:13 +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
9eaef6e333
Fully drop State references.
2021-03-31 15:45:18 +09:00
Blaž Hrastnik
1b5316ea74
Track document modified state.
2021-03-30 18:23:12 +09:00
Blaž Hrastnik
742b3a709f
Store intra-files jumps (goto) on the jumplist.
2021-03-29 16:32:42 +09:00
Blaž Hrastnik
c1f2a14453
view: document.rs cleanup
2021-03-29 15:22:43 +09:00
Blaž Hrastnik
aefafc25cd
Replace Mode::Goto with just using on_next_key.
2021-03-29 15:04:29 +09:00
Blaž Hrastnik
cf0e191a6a
Clippy lint
2021-03-25 17:45:52 +09:00
Blaž Hrastnik
a65395d94b
Load theme from toml file.
2021-03-25 16:42: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
8657c57cf2
Trivial jumplist implementation.
2021-03-24 18:01:26 +09:00
Blaž Hrastnik
4b176caded
Reset first_line when changing files.
2021-03-24 16:56:29 +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
b24cdd1295
Derive a separate ViewId type.
2021-03-24 14:03:20 +09:00
Blaž Hrastnik
8328fe926d
Drop refcell use, make view simply ref doc.id.
2021-03-23 18:14:35 +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
cbcacb1063
Merge some imports.
2021-03-22 12:40:07 +09:00
Blaž Hrastnik
c4792efead
clippy lints
2021-03-22 12:29:55 +09:00
Blaž Hrastnik
c331721565
Finish hiding doc.state / State as an implementation detail.
2021-03-18 15:07:02 +09:00