Antonio Scandurra
7080d66f1e
Fix diagnostic unit test
2021-12-10 09:43:21 +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
40626249cd
WIP
2021-12-08 20:04:30 -07: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
Max Brunsfeld and Nathan Sobo
668c672db8
Implement Anchor, AnchorRangeMap, SelectionSet in multi_buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-08 12:56:09 -08:00
Max Brunsfeld and Nathan Sobo
9b0470e8e0
Rename ExcerptList to MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-08 10:07:15 -08: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
Max Brunsfeld
214354078e
Give more specific names to all snapshot and text iterator types
2021-12-08 09:24:00 -08:00
Max Brunsfeld
b220bf4a26
Fix assertion in excerpt unit test after fixing edits
2021-12-06 17:40:32 -08:00
Max Brunsfeld
54713a04b6
Fix Subscription re-export after moving it into its own module
2021-12-06 17:40:17 -08:00
Max Brunsfeld
d078c01b63
Implement and randomized test excerpt list point translation and clipping
2021-12-06 17:39:31 -08:00
Max Brunsfeld
8a28ebc03a
🎨 excerpt_list::Chunks::next
2021-12-06 16:28:44 -08:00
Max Brunsfeld
aff3a4d5ef
Get random excerpts test passing w/ text in range, edits
2021-12-06 16:17:31 -08:00
Nathan Sobo and Max Brunsfeld
0f82f12d35
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 14:51:23 -07:00
Nathan Sobo and Max Brunsfeld
26335dc776
Get randomized test passing on basic excerpt list features
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 13:48:07 -07:00
Nathan Sobo and Max Brunsfeld
91de6540a3
Implement ExcerptList::subscribe
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 13:37:17 -07:00
Nathan Sobo and Max Brunsfeld
a8734cd592
Get the basic ExcerptList unit test passing again
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 13:01:09 -07:00
Nathan Sobo and Max Brunsfeld
9f33388a80
Rename FragmentList to ExcerptList
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 11:59:32 -07:00
c3d8c3997f
Introduce Buffer::edits_since_in_range
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-12-06 19:48:45 +01:00
Antonio Scandurra
45198f646b
Start on a simple randomized test for FragmentList
2021-12-06 16:08:17 +01:00
Antonio Scandurra
2597ac9185
🎨
2021-12-06 14:03:38 +01:00
Antonio Scandurra
141325d792
Start on maintaining edits in FragmentList
2021-12-06 12:10:25 +01: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
8fb0df07b7
WIP: Edit one of the excerpted buffers and add an assertion
...
We'll need to detect edits on the child buffers and understand their impact on the tree.
2021-12-04 07:19:30 -07: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
Antonio Scandurra and Nathan Sobo
ca383df31e
Avoid allocating a Patch just to check if there are no edits
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 16:47:04 +01: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
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 and Nathan Sobo
604fc600ac
Allow a single start/end bias per AnchorRangeMap
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-25 16:53:10 +01:00
Max Brunsfeld
468004c958
Implement toggle-comments
2021-11-23 14:13:28 -08:00
Nathan Sobo
d14fc2f6d9
Use uniform biases in AnchorMap, AnchorRangeMap
...
Specifying a different bias for every point makes the interface feel pretty unwieldy and we don't really use it.
2021-11-22 15:30:46 -07:00
Max Brunsfeld and Nathan Sobo
2eb364f8d6
Fix the bias of deserialized selection sets
...
Fixes #224
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-22 14:14:48 -08:00
Antonio Scandurra and Nathan Sobo
9b8b645b39
Switch to a dense representation for clock::Global
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-22 17:20:43 +01:00
Antonio Scandurra and Nathan Sobo
216f3a9751
Enhance keyboard navigation when showing next diagnostic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-18 16:55:18 +01:00
Antonio Scandurra and Nathan Sobo
83baebd525
In a diagnostic group, mark the highest-severity diagnostic as primary
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-18 15:53:00 +01:00
Antonio Scandurra and Nathan Sobo
1ff989e634
Support highlighting in blocks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-18 14:08:21 +01:00
Nathan Sobo and Max Brunsfeld
e0ba047955
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
Max Brunsfeld and Nathan Sobo
c965e1da25
Fix group_ids assertions in diagnostics test
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-15 14:18:58 -08:00
Antonio Scandurra
512280bfeb
Add text manipulation facilities to Rope for test purposes
2021-11-12 17:02:51 +01:00