Commit Graph
83 Commits
Author SHA1 Message Date
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
Antonio ScandurraandNathan 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 ScandurraandNathan 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 ScandurraandNathan Sobo 756b950eb7 Refactor retrieving oldest and newest selection
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-18 15:18:35 +01:00
Antonio Scandurra 99dbecda99 Re-enable tabs, spaces and multi-byte characters in randomized tests 2021-11-18 10:35:31 +01:00
Nathan SoboandMax Brunsfeld f6fc712269 WIP: Track down bugs with longest_row on wrap map
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-17 19:45:56 -07:00
Max BrunsfeldandNathan Sobo edb46be7d3 Implement BlockSnapshot::line_len, use it in DisplayMap
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-17 14:56:05 -08:00
Antonio Scandurra b9c460a3a0 WIP 2021-11-15 17:54:28 +01:00
Antonio ScandurraandNathan Sobo 70278e995d Make BlockMap randomized test pass in low-complexity cases
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-15 16:47:30 +01:00
Antonio ScandurraandNathan Sobo 123d103d9e Make BlockMap unit test pass with 2d coordinates
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-15 16:30:58 +01:00
Nathan SoboandMax Brunsfeld cf88c4d226 Sketch an initial implementation for block_map::HighlightedChunks
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-12 14:51:25 -07:00
Antonio Scandurra 512280bfeb Add text manipulation facilities to Rope for test purposes 2021-11-12 17:02:51 +01:00
Nathan Sobo ee2ea9432a WIP: Probably the wrong direction 2021-11-10 17:44:56 -07:00
Antonio ScandurraandNathan Sobo 33e4f8f6c3 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 ScandurraandMax Brunsfeld 6c5de48e00 Avoid ending the pending selection until updating selections
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-03 19:07:06 +01:00
b09850a993 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
Max BrunsfeldandNathan Sobo 0a178d2d15 Replicate diagnostics to remote buffers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-01 15:28:37 -07:00
Max BrunsfeldandNathan Sobo 7270358c7c 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
Antonio Scandurra d941e129e7 Take a &clock::Global instead of cloning in edits_since 2021-11-01 10:48:20 +01:00
Antonio ScandurraandNathan Sobo 8a5bee616d 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
Max Brunsfeld 825fb94fc6 Merge branch 'anchor-map-selections' into lsp 2021-10-28 17:08:06 -07:00
Max Brunsfeld b8ddf94557 🎨 anchor.rs 2021-10-28 16:48:07 -07:00
Max Brunsfeld 5cb767e73b Rename AnchorRangeSet::to_point_ranges -> point_ranges 2021-10-28 16:32:49 -07:00
Max Brunsfeld 9af0d07f23 Create valid disjoint selection sets in selections_in_ranges 2021-10-28 16:04:16 -07:00
Max Brunsfeld d0c6a52c81 Get the Editor crate compiling 2021-10-28 15:42:24 -07:00
Antonio ScandurraandMax Brunsfeld 4fdefb4cb3 Start fixing compilation errors on Editor
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-10-28 19:36:43 +02:00
Antonio ScandurraandMax Brunsfeld 6279e74712 Clip points coming from language server
This avoids panicking in Zed if the points they give us are invalid.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-10-28 19:02:26 +02:00
Antonio Scandurra e260151c5f Report new_lines extent correctly when coalescing edits 2021-10-28 11:32:10 +02:00
Nathan SoboandMax Brunsfeld 85892ad428 Adjust disk-based diagnostics based on edits since the last save
Still need to add tests... not sure if this is right yet.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-27 18:58:07 -06:00
61c1354415 Introduce FullOffset type
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-10-27 18:30:00 -06:00
Antonio Scandurra 10ad2d113c Fix bug in to_full_offset when Anchor::version != Content::version 2021-10-27 11:56:04 +02:00
Max BrunsfeldandNathan Sobo a827f6b6d7 Generalize AnchorRangeMultimap's 'intersecting ranges' API
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-26 17:56:39 -07:00
Max Brunsfeld fef3c44f4a Allow retrieving a buffer's diagnostics 2021-10-26 15:46:08 -07:00
Antonio Scandurra a6d95b9652 WIP 2021-10-26 19:42:40 +02:00
Antonio ScandurraandNathan Sobo 98f3a2eed2 Take ToOffset instead of anchors in intersecting_point_ranges
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-26 17:04:12 +02:00
Antonio Scandurra 165161687c Introduce Content::anchor_range_multimap 2021-10-26 14:28:02 +02:00
Max BrunsfeldandNathan Sobo 2cfdf3096e Start work on AnchorRangeMultimap
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-25 21:42:55 -07:00
Nathan Sobo 0beb4ffe93 Get language and project compiling 2021-10-25 09:26:36 -06:00
Nathan Sobo 27d84b4f56 Get buffer compiling with new SelectionSets based on AnchorRangeMap
One test is failing however.
2021-10-22 14:12:16 -06:00
Nathan Sobo 1d85cf2ef5 WIP: Start converting SelectionSet to use AnchorRangeMap 2021-10-22 13:19:19 -06:00
Nathan Sobo ddbc43beb3 Implement TryFrom<proto::SelectionSet> on SelectionSet
More prep work for changing the selection set representation.
2021-10-22 12:46:02 -06:00
Nathan Sobo df9dad2804 Simplify protocol messages related to selection sets
This prepares the way to switch to using AnchorRangeMaps to store and transmit selection sets.
2021-10-22 12:35:29 -06:00
Nathan Sobo f9abbd1900 Move SelectionSet and Into impl to selection module 2021-10-22 09:56:47 +02:00
6d8aa9f7d8 Assign new file handles on buffers when their files change on disk
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-21 13:08:54 +02:00
Max Brunsfeld 7a3a9575e2 Rename TextBuffer back to Buffer 2021-10-21 11:12:19 +02:00
Max Brunsfeld 3f96f0aa6f Remove unnecessary dependencies in buffer and language crates 2021-10-21 09:40:50 +02:00
Max Brunsfeld 34cda9fe9b Extract a language crate 2021-10-20 22:51:40 +02:00
Max Brunsfeld a0d4443c38 Re-enable randomized concurrent edits test 2021-10-20 21:44:26 +02:00
b84f5e3940 Extract a TextBuffer from Buffer, which has no tree or file
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-20 00:10:57 +02:00
230307ce59 Insert an extra newline between brackets
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-19 13:17:16 +02:00