Antonio Scandurra
e37908cf3b
Start on a simple randomized test for FragmentList
2021-12-06 16:08:17 +01:00
Antonio Scandurra
8354d1520d
🎨
2021-12-06 14:03:38 +01:00
Antonio Scandurra
45d6f5ab04
Start on maintaining edits in FragmentList
2021-12-06 12:10:25 +01:00
Antonio Scandurra
8f90d42723
Merge branch 'main' into project-diagnostics
2021-12-06 09:39:03 +01:00
Max Brunsfeld
026c3476db
Upgrade tree-sitter to 0.20.1
2021-12-05 21:37:08 -08:00
Nathan Sobo
0be897d5ac
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
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
e668ff8bcd
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
733e0cb21b
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
3b536f153f
Introduce text::Buffer::subscribe
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-01 15:55:05 +01: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
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
1445ce10b5
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
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
9d7039ed51
Embed a plain text grammar and override settings for that too
2021-11-29 18:01:51 +01:00
Antonio Scandurra
2c17ae9aa6
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
2f43ef67fd
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
f0db748ba1
Implement toggle-comments
2021-11-23 14:13:28 -08:00
Nathan Sobo
2f39dee28b
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
612b4404a9
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
b25c3eb740
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
5094380c83
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
0e51365770
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
0a6293bcda
Support highlighting in blocks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-18 14:08:21 +01:00
Nathan Sobo
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
Max Brunsfeld
8b1b35913a
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
4e32fabfdc
Add text manipulation facilities to Rope
for test purposes
2021-11-12 17:02:51 +01:00
Antonio Scandurra
2f4d8932dc
Allow querying a diagnostic group by its id
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-04 15:16:59 +01:00
Antonio Scandurra
78bbb83448
Assign diagnostics a group_id
based on their related_information
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-04 14:52:34 +01:00
Nathan Sobo
2d6285a6e1
Start on a test for grouped diagnostics
2021-11-03 18:47:18 -06:00
Max Brunsfeld
baf636a4a4
Extend empty diagnostic ranges at the ends of lines
2021-11-03 13:49:39 -07:00
Max Brunsfeld
8b5089c759
In the status bar, show the diagnostic under the cursor
2021-11-03 12:33:16 -07:00
Antonio Scandurra
c07d794249
Avoid ending the pending selection until updating selections
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-03 19:07:06 +01:00
Antonio Scandurra
9dc3c74260
Make resolving selections generic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-03 17:51:57 +01:00
Antonio Scandurra
20a77f4c5e
Fix test for disk-based diagnostics
2021-11-03 09:39:15 +01:00
Max Brunsfeld
8d3f42de52
Start language servers based on buffers' languages
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-02 17:41:01 -07:00
Max Brunsfeld
89392cd23d
Avoid using worktree handle in File's path methods
...
This avoids a circular model update that was happening
when trying to retrieve the absolute path from a buffer's
file while applying remote operations.
2021-11-02 14:33:55 -07:00
Max Brunsfeld
1995bd89a6
Deserialize buffer's diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-02 12:29:03 -07:00
Max Brunsfeld
61e06487b7
Avoid circular model update when sending diagnostics operations
2021-11-01 17:14:22 -07:00
Max Brunsfeld
0e62ddbb65
Replicate diagnostics to remote buffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-01 15:28:37 -07:00
Max Brunsfeld
40c861c249
Move protobuf logic from buffer crate to language crate
...
This will enable us to add operations that only pertain to the language crate.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-01 14:05:19 -07:00
Max Brunsfeld
78d97a3db2
Use Diagnostic struct in buffer's diagnostics multimap
2021-11-01 12:59:01 -07:00
Max Brunsfeld
1aee7bdb1d
Delay quit until language servers are gracefully shut down
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-01 11:57:31 -07:00
Antonio Scandurra
6e5ec2a00d
Take a &clock::Global
instead of cloning in edits_since
2021-11-01 10:48:20 +01:00
Antonio Scandurra
f59be5fecf
Always notify when receiving buffer operations
...
We had changed it to only emit a notification when the buffer was
actually edited, but we also want to notify when we receive non-edit
operations, such as a selection update.
2021-11-01 10:06:23 +01:00
Antonio Scandurra
b571eae4f3
Extend empty diagnostic ranges by one character
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-29 19:09:19 +02:00
Antonio Scandurra
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
9c1b01521a
Avoid unnecessary conversion to offsets in diagnostics_in_range
2021-10-29 14:41:41 +02:00
Max Brunsfeld
e1556893f7
Merge branch 'anchor-map-selections' into lsp
2021-10-28 17:08:06 -07:00