Max Brunsfeld
6444fcd442
Integrate MultiBuffer::buffer_rows into the display map
2021-12-16 13:53:32 -08:00
Antonio Scandurra
ec39c9d335
Allow specifying MAX_EXCERPTS via an env variable in random tests
2021-12-16 12:28:54 +01:00
Max Brunsfeld and Nathan Sobo
4c22774694
Always clip buffer points when clipping display points
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 17:58:24 -08:00
Max Brunsfeld
f898dc6dae
Guard against inverted ranges when building edits in unfold
...
The multibuffer lets you refer to offsets inside of headers,
so it's possible to create a fold that appears non-empty,
but which spans zero characters in the underlying buffers.
Fold ranges are biased inward: the start is biased right, and
the end is biased left.
Because of these two things, it's possible to create a fold
that becomes "inverted" when you insert text at that position.
2021-12-15 17:29:15 -08:00
Antonio Scandurra and Nathan Sobo
bcdb4ffd88
Allow edits at the end of MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 16:45:01 +01:00
Antonio Scandurra and Nathan Sobo
7bbaa1d930
Don't insert a newline after the last excerpt of a MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 16:39:09 +01:00
Antonio Scandurra and Nathan Sobo
ae0fa75abe
Start testing the integration of display layers with MultiBuffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 16:05:26 +01:00
Nathan Sobo
c8b43e3078
Move multi_buffer to editor crate
2021-12-10 17:37:53 -07:00
Max Brunsfeld
a758bd4f8d
Fill in some missing methods on MultiBuffer, MultiBufferSnapshot
2021-12-10 14:27:04 -08:00
Antonio Scandurra and Nathan Sobo
7524974f19
Get everything compiling again
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 17:15:16 +01:00
Nathan Sobo and Max Brunsfeld
87d16c271e
Get Editor compiling with MultiBuffer as its buffer
...
There's a bunch of unimplemented methods in MultiBuffer, but everything compiles.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-08 19:23:04 -07:00
5f8e406c18
Fill out ExcerptList API
...
This restores the improvements that we had made on the `project-diagnostics-generic` branch.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-08 10:04:22 -08:00
Max Brunsfeld
6a44a7448e
Consolidate Edit types in editor crate
2021-12-08 09:33:55 -08:00
Max Brunsfeld
fa379885f1
Give more specific names to all snapshot and text iterator types
2021-12-08 09:24:00 -08:00
Nathan Sobo
811696670a
Start on a new FragmentList
...
Here I'm exploring a new approach to the project-wide diagnostics view that can exactly mirror the contents of cargo check. The `FragmentList` composes an arbitrary list of fragments from other buffers and presents them as if they were a single buffer.
2021-12-04 06:57:56 -07:00
Antonio Scandurra
47c467dafc
Bump FoldMap's version in FoldMap::sync (and not in DisplayMap)
2021-12-01 12:05:02 +01:00
Max Brunsfeld and Nathan Sobo
faba276fdc
WIP - maintain foldmap with Buffer::edits_since
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-30 17:23:02 -08:00
Max Brunsfeld
924e1578ea
Use &Snapshot directly instead of impl Into<Content<'a>>
...
The text::Buffer and its snapshot already used the same representation
for their content, so we can just make Buffer deref to a Snapshot.
2021-11-30 13:32:11 -08:00
Nathan Sobo and Max Brunsfeld
d3f28166cb
Rename buffer crate to text and name its entrypoint after the crate
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-11-30 12:26:12 -07:00
Antonio Scandurra and Nathan Sobo
0a6293bcda
Support highlighting in blocks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-18 14:08:21 +01:00
Antonio Scandurra
84d257470a
Fix empty range edge case in FoldMap
2021-11-18 10:33:31 +01:00
Nathan Sobo and Max Brunsfeld
52a4c15c14
Eliminate non-highlighted chunks APIs
...
Now we only have a single code path for chunks across all layers, but highlighting is optional and controlled by a flag.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-11-16 16:51:38 -08:00
Antonio Scandurra
4e32fabfdc
Add text manipulation facilities to Rope for test purposes
2021-11-12 17:02:51 +01:00
Antonio Scandurra
6e5ec2a00d
Take a &clock::Global instead of cloning in edits_since
2021-11-01 10:48:20 +01:00
Antonio Scandurra and Nathan Sobo
6212ebad9b
Communicate with language servers in terms of UTF-16 coordinates
...
This required indexing UTF-16 positions in `Rope`. We tried opting
into the UTF-8 experimental support but it didn't seem to work
correctly and the standard is UTF-16 anyway.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-29 18:33:23 +02:00
Antonio Scandurra
bc076c1cc1
Update display map snapshots when diagnostics are updated
...
This is similar to what we do when we receive new parse trees from
tree-sitter.
2021-10-27 12:42:16 +02:00
Max Brunsfeld and Nathan Sobo
c539069cbb
Include diagnostic info in HighlightedChunks iterator
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-26 17:57:50 -07:00
Antonio Scandurra
e8a2885721
Introduce Content::anchor_range_multimap
2021-10-26 14:28:02 +02:00
Max Brunsfeld
81a85e9c79
Extract a language crate
2021-10-20 22:51:40 +02:00
Max Brunsfeld
cdb268e656
Re-enable randomized concurrent edits test
2021-10-20 21:44:26 +02:00
Max Brunsfeld and Nathan Sobo
94209d2b6d
Rename rpc_client -> client
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-04 17:14:21 -07:00
Max Brunsfeld and Nathan Sobo
1d97f08901
Move editor into its own crate
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-04 15:23:10 -07:00