Antonio Scandurra
e00eafb3e8
WIP
2021-07-19 15:45:49 +02:00
Antonio Scandurra
9e448e694d
Add fold_map::Snapshot::text_summary_for_range
2021-07-19 12:25:27 +02:00
Antonio Scandurra
7a86a2c831
Change fold_map::Edit to return DisplayOffsets
...
This is needed so that we can translate display offsets into display
points in the `WrapMap`.
2021-07-19 11:34:47 +02:00
Antonio Scandurra
38dffc310f
Fix errors in WrapMap randomized tests
2021-07-19 10:48:13 +02:00
Antonio Scandurra
9895c77f5c
WIP
2021-07-16 18:43:50 +02:00
Antonio Scandurra and Nathan Sobo
1ba9e48271
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-16 17:53:23 +02:00
Antonio Scandurra
8d3c3d7c46
Work on a randomized test for edits/snapshots returned by FoldMap
...
...and make it pass too!
2021-07-16 15:48:43 +02:00
Antonio Scandurra
831b620e51
Make writing/reading FoldMap explicit so that we can retrieve edits
2021-07-16 13:49:38 +02:00
Antonio Scandurra
23b55d88d9
Pull snapshot history out of fold map
2021-07-16 13:49:02 +02:00
Max Brunsfeld
e0930ddc09
Add FoldMapSnapshot::edits_since_creation
2021-07-15 18:27:59 -07:00
Nathan Sobo and Max Brunsfeld
8b34deab58
Try to return edits from FoldMap::apply_edits
...
The goal is to describe how the fold map changed. Hopefully this is correct.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 15:08:18 -06:00
Nathan Sobo and Max Brunsfeld
2c9f730638
Give the FoldMap its own edit type that does not have deleted_lines
...
We want to use this struct to communicate about edits performed to the fold map itself, and it will be simpler if we don't have to communicate this data.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 14:19:58 -06:00
Max Brunsfeld
f561f33aa9
Move DisplayMap's reading methods to DisplayMapSnapshot
2021-07-15 11:48:57 -07:00
Nathan Sobo and Max Brunsfeld
2bde54971e
Move all FoldMap query methods to FoldMapSnapshot
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 11:36:24 -06:00
Antonio Scandurra
be954872d0
Calculate an old_lines range in Edits iterator
2021-07-15 10:11:24 +02:00
Antonio Scandurra
c2e7460fcd
WIP
2021-07-14 19:09:46 +02:00
Antonio Scandurra
a5edc14e3a
WIP: Start on WrapMap
2021-07-14 18:43:48 +02:00
Antonio Scandurra
e80439daaa
Merge branch 'main' into rpc
2021-06-29 10:25:42 +02:00
Max Brunsfeld
60ee97be24
Always represent anchor as a versioned offset
...
Remove the `Start` and `End` variants, and always
use the structure that was previously called `Middle`.
This makes Anchors simpler to serialize and deserialize.
2021-06-25 17:02:48 -07:00
Max Brunsfeld
04c80578bc
Start work on sending buffer operations
2021-06-25 13:46:36 -07:00
Nathan Sobo and Max Brunsfeld
a364839e93
Replace FileHandle with File entity that subscribes to Worktree update events
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-21 20:40:40 -06:00
Antonio Scandurra
742241a903
Rename Cursor::{start,end} to Cursor::{sum_start,sum_end}
2021-06-10 14:06:27 +02:00
Antonio Scandurra
dc2805bb14
Add Cursor::seek_end and audit the codebase to use seek_start more
2021-06-10 14:05:56 +02:00
Antonio Scandurra
e071d40058
Use a single Bias enum everywhere
2021-06-04 13:39:57 +02:00
Antonio Scandurra
311e1b0f5e
Supply a context when adding summary to Dimension
2021-06-01 12:50:10 +02:00
Antonio Scandurra
e8a9eee84f
WIP
2021-05-31 16:57:15 +02:00
Max Brunsfeld
16c6400145
Rename context parameters to cx in fold_map.rs
2021-05-28 15:08:38 -07:00
Max Brunsfeld and Nathan Sobo
139bcb8304
Rename foo/mod.rs files too foo.rs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-28 14:41:58 -07:00
Max Brunsfeld and Nathan Sobo
8b7a314474
Implement bracket matching using queries
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-28 13:09:57 -07:00
Antonio Scandurra
23d1d91414
Implement select_larger_syntax_node for buffer
2021-05-28 13:25:09 +02:00
Antonio Scandurra
07aeb32ef4
Punt on auto-indentation for now
2021-05-28 10:17:10 +02:00
Max Brunsfeld and Nathan Sobo
7bea3fd2fe
Start on a query-based autoindent system
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-26 17:23:53 -07:00
Antonio Scandurra
04c7989720
Extract a LanguageConfig and load it from language-dir/config.toml
2021-05-26 10:27:14 +02:00
Max Brunsfeld and Nathan Sobo
5d2ac3f4e4
Use new Tree-sitter captures API
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-25 16:02:43 -07:00
Antonio Scandurra
43ddb6f640
WIP: Push failing test for DisplayMap::highlighted_chunks_at
2021-05-25 17:20:46 +02:00
Antonio Scandurra
2e7593dd79
💄
2021-05-25 14:20:53 +02:00
Antonio Scandurra
aeb68867da
Move highlighted_text_in_range from Buffer to buffer::Snapshot
2021-05-25 11:51:29 +02:00
Max Brunsfeld
8340958b33
Convert query capture indices to style ids
...
* Introduce a Theme struct as a new part of the app's settings
* Store on each Language a ThemeMap, which converts the capture ids
from that language's highlight query into StyleIds, which identify
styles in the current Theme.
* Update `highlighted_chunks` methods to provide StyleIds instead of
capture ids.
2021-05-24 16:44:14 -07:00
Antonio Scandurra
bc8d2b2f1d
💄
2021-05-24 17:14:17 +02:00
Antonio Scandurra
d063ebdf9b
Correctly store current chunk offset in fold_map::HighlightedChunks
2021-05-24 16:52:01 +02:00
Antonio Scandurra
4b8805bad2
Add DisplayMap::highlighted_chunks_at(row)
...
Note that this API doesn't take a DisplayPoint: it could but it
makes things a bit harder on the implementation side and we don't
really need it anyway, as text is laid out on a line-by-line basis
anyway.
2021-05-24 16:46:11 +02:00
Antonio Scandurra
4ddf10967e
Introduce fold_map::HighlightedChunks
2021-05-24 15:39:22 +02:00
Antonio Scandurra
4ada5e0666
Rename rope::ChunksIter to rope::Chunks
...
This is consistent with how we name the other chunk iterators.
2021-05-24 15:05:11 +02:00
Antonio Scandurra
3a576f0b65
Don't clone visible_text for splicing edits into the parse tree
2021-05-22 12:34:35 +02:00
Max Brunsfeld
46e6b2cff4
Start maintaining a syntax tree on buffers
2021-05-22 12:34:35 +02:00
Antonio Scandurra and Nathan Sobo
b42f5142f7
Rename rightmost_{row,chars} to longest_{row,chars}
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-20 16:32:09 +02:00
Antonio Scandurra
6a0757ebf9
Don't store rightmost row/char-column as a Point
2021-05-20 12:52:58 +02:00
Antonio Scandurra
ed57ffe5fa
Replace rightmost_point with righmost_row
2021-05-20 12:47:08 +02:00
Antonio Scandurra
96538354b3
Express rightmost_point in terms of chars as opposed to bytes
2021-05-20 12:47:08 +02:00
Max Brunsfeld
a2c36fcdb7
Fix bugs and add tests for move_{up,down}
2021-05-20 12:47:08 +02:00