Antonio Scandurra
f519000b57
Implement MultiBufferSnapshot::remote_selections_in_range
2021-12-14 11:34:26 +01:00
Antonio Scandurra
c065fdc08e
Assume all excerpts in the multi buffer have the same language for now
2021-12-14 11:33:53 +01:00
Antonio Scandurra
f493b6d308
Keep a separate diagnostic update count and parse count in MultiBuffer
2021-12-14 11:32:49 +01:00
Max Brunsfeld
4dc84c6dca
WIP
2021-12-13 17:44:20 -08:00
Max Brunsfeld and Nathan Sobo
125adca342
Get tests passing after diagnostic + selection changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 11:34:56 -08:00
Antonio Scandurra and Nathan Sobo
e3bf3af3f5
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 16:46:35 +01:00
Antonio Scandurra and Nathan Sobo
4edc9d4bf4
First attempt at implementing MultiBuffer::edit_internal
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 15:43:26 +01:00
Antonio Scandurra
52a5bfa4c8
Show remote collaborators' active selections
2021-12-13 11:38:38 +01:00
Nathan Sobo
b00acf619a
Test undo/redo at editor layer, including selection restoration
2021-12-12 15:04:19 -07:00
Nathan Sobo
ede5b1839d
Restore selections upon undo/redo of edits performed in the current editor
2021-12-12 14:12:03 -07:00
Nathan Sobo
d3dc0ca59a
Get selections rendering again when local selections are owned by Editor
2021-12-11 13:42:46 -07:00
Nathan Sobo
9836638fb5
More messy progress towards selections in editors
2021-12-11 00:29:34 -07:00
Nathan Sobo
8132548290
WIP
2021-12-10 22:16:39 -07:00
Nathan Sobo
5fc5ed5754
WIP: Start on removing selections from buffer in favor of editor
2021-12-10 19:23:34 -07:00
Nathan Sobo
8b62df74fd
Return optional transaction ids from undo/redo
...
This will allow the editor to restore selections that it associated with the start or end of a transaction.
2021-12-10 18:08:26 -07:00
Nathan Sobo
55bcc9fa9e
Return optional transaction ids when starting/ending a transaction
...
If the transaction was nested, we return None. Otherwise we return the transaction id in preparation for editors to maintain their own selection state.
2021-12-10 18:00:09 -07:00
Nathan Sobo
271b092ec1
Move multi_buffer to editor crate
2021-12-10 17:37:53 -07:00
Max Brunsfeld and Nathan Sobo
df8c24583e
Get tests passing w/ multibuffer in editor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 15:54:25 -08:00
Max Brunsfeld
bb6f9a6936
Fill in some missing methods on MultiBuffer, MultiBufferSnapshot
2021-12-10 14:27:04 -08:00
Antonio Scandurra and Nathan Sobo
f529f3ec6f
Start making MultiBuffer work with a singleton buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 18:04:11 +01:00
Antonio Scandurra and Nathan Sobo
cced16aa49
Get everything compiling again
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 17:15:16 +01:00
Antonio Scandurra and Nathan Sobo
f019700264
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 16:14:12 +01:00
Max Brunsfeld
ca04b13788
Merge branch 'fragment-locators' into HEAD
2021-12-09 14:49:04 -08:00
Antonio Scandurra and Nathan Sobo
cbb2f5cbc7
Fix some of the diagnostic tests and make DiagnosticEntry generic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-09 17:53:08 +01:00
Antonio Scandurra and Nathan Sobo
a29758b389
Remove anchor collections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-09 17:28:27 +01:00
Nathan Sobo
2e016dd393
Take a cx in MultiBuffer::start_transaction
2021-12-08 19:30:52 -07:00
Nathan Sobo and Max Brunsfeld
66798f3be7
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
0ba237f72c
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
Antonio Scandurra
6a6dcc0975
Remove lifetime parameter from TextDimension trait
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-12-08 09:45:57 -08:00
Max Brunsfeld
a6d3726fc9
Consolidate Edit types in editor crate
2021-12-08 09:33:55 -08:00
Max Brunsfeld
214354078e
Give more specific names to all snapshot and text iterator types
2021-12-08 09:24:00 -08:00
Antonio Scandurra
7827aeff58
Merge branch 'main' into project-diagnostics
2021-12-06 09:39:03 +01:00
Max Brunsfeld
f831277317
Upgrade tree-sitter to 0.20.1
2021-12-05 21:37:08 -08:00
Nathan Sobo
43e8162eb2
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
Nathan Sobo and Max Brunsfeld
8e3630df62
Fix alignment of blocks adjacent to other blocks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-01 17:58:44 -07:00
Nathan Sobo and Max Brunsfeld
26ab95eae9
Get all tests passing with new blocks API
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-01 17:52:34 -07:00
Nathan Sobo and Max Brunsfeld
26a4b9cca6
Use new BlockMap API to render diagnostics
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-01 17:22:40 -07:00
Max Brunsfeld and Nathan Sobo
cf3093aace
Start work on generalizing the BlockMap to allow arbitrary elements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 15:25:55 -08:00
Antonio Scandurra and Nathan Sobo
9fb5b384dc
Use the new buffer subscription API to keep DisplayMap in sync
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 16:08:53 +01:00
Antonio Scandurra and Nathan Sobo
137a1969bd
Introduce text::Buffer::subscribe
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 15:55:05 +01:00
Antonio Scandurra
8bb9cb3953
Bump FoldMap's version in FoldMap::sync (and not in DisplayMap)
2021-12-01 12:05:02 +01:00
Max Brunsfeld and Nathan Sobo
80a05508ba
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
a0cb583fcb
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
93322a4858
Name the root file of every crate after the crate to ease navigation
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-11-30 12:46:39 -07:00
Nathan Sobo and Max Brunsfeld
811689d234
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
Nathan Sobo and Antonio Scandurra
539698ec40
Avoid building up pending edits when soft wrapping is disabled
...
This was causing us to get slower over time as we stacked up hundreds of thousands of pending edits whenever soft wrap was disabled.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-11-30 08:28:29 -07:00
Max Brunsfeld and Nathan Sobo
ca11c68a19
Introduce weak_handle methods on ModelContext and ViewContext
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-29 14:13:22 -08:00
Antonio Scandurra
43583e1e80
Embed a plain text grammar and override settings for that too
2021-11-29 18:01:51 +01:00
Antonio Scandurra and Nathan Sobo
c9e4f7a7eb
Introduce a new Grammar struct and allow it to be optional
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-29 17:38:59 +01:00
Antonio Scandurra
f1ef633508
Allow overriding editor settings on a per-language basis
2021-11-29 09:39:13 +01:00