Commit Graph
5172 Commits
Author SHA1 Message Date
Nathan Sobo 3755612f17 WIP 2021-11-14 16:24:40 -07:00
Nathan Sobo 97ba91ad61 WIP: Start moving BlockMap to a 2d indexing scheme 2021-11-14 08:29:41 -07:00
Nathan Sobo 1dca403f89 Hack: Synthesize a newline before blocks below the last line of the buffer 2021-11-14 07:43:35 -07:00
Nathan Sobo 4370447e98 Account for trailing below blocks in BlockSnapshot::max_point 2021-11-13 19:50:42 -07:00
Nathan Sobo 279e11b0a1 Fix BlockMap unit test by skipping below blocks when advancing transforms 2021-11-13 18:19:21 -07:00
Nathan Sobo ca47e73743 Start on BlockSnapshot::clip_point
Not sure it works yet. Ran into another failure in the unit tests.
2021-11-13 17:44:09 -07:00
Max Brunsfeld d714bf4fa0 wip - wiring up blockmap into displaymap 2021-11-12 17:29:09 -08:00
Max BrunsfeldandNathan Sobo fe771eb5f9 Make block insertion work in simple cases
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-12 16:40:01 -08:00
Max Brunsfeld d33cd94256 Fix compile errors 2021-11-12 13:55:47 -08: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
Max Brunsfeld 8bc352e0b7 wip 2021-11-12 12:09:35 -08:00
Max Brunsfeld c876cd43bd BlockMap WIP 2021-11-12 11:49:48 -08:00
Antonio ScandurraandMax Brunsfeld dbe4a6af87 Start on a randomized test for BlockMap
This is currently passing and ensures we maintain the input coordinate
space correctly.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-12 19:01:39 +01:00
Antonio Scandurra 5ed7738bdd Remove redundant code path in Patch::compose 2021-11-12 17:24:25 +01:00
Antonio Scandurra 709a392063 Maintain row edits since last sync in WrapMap 2021-11-12 17:05:49 +01:00
Antonio Scandurra 512280bfeb Add text manipulation facilities to Rope for test purposes 2021-11-12 17:02:51 +01:00
Antonio Scandurra 0dab92d2f6 Init env_logger in the editor crate for tests only 2021-11-12 17:01:57 +01:00
Antonio Scandurra aa98f147ba Use log::info instead of println in patch randomized tests 2021-11-12 17:00:44 +01:00
Antonio Scandurra ed6d3561fb 🎨 2021-11-12 16:31:01 +01:00
Antonio Scandurra c0fd8eba6e Make Patch::compose work 2021-11-12 15:07:28 +01:00
Antonio Scandurra b01e3e0f74 Avoid composing edits together for now 2021-11-12 09:01:15 +01:00
Nathan Sobo 4f758e8f45 WIP 2021-11-12 00:20:39 -07:00
Nathan Sobo e3ca98dab3 wip 2021-11-12 00:03:47 -07:00
Nathan Sobo ab48ed0852 WIP 2021-11-11 23:28:45 -07:00
Max Brunsfeld 56cd64ee24 Simplify assertions in randomized patch test, fix some patch bugs 2021-11-11 18:28:07 -08:00
Max BrunsfeldandNathan Sobo 75a7d052ee Add patch unit tests, get composition working for ops <= 3
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-11 17:36:30 -08:00
Antonio Scandurra 790bbcd2a4 WIP 2021-11-11 19:49:01 +01:00
Antonio Scandurra ce6602a8f6 WIP 2021-11-11 19:42:55 +01:00
Antonio Scandurra 48312c0dee WIP 2021-11-11 18:13:35 +01:00
Antonio ScandurraandNathan Sobo f22d9a3de4 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-11 16:52:14 +01:00
Antonio ScandurraandNathan Sobo b943003490 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-11 16:00:52 +01:00
Antonio ScandurraandNathan Sobo ada905a9d0 WIP: Start on BlockMap
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-11 15:04:39 +01:00
Antonio Scandurra 83b625063e WIP 2021-11-11 15:04:31 +01:00
Nathan Sobo 8d8a710dbf WIP: Rework injection map to be focused solely on block injections 2021-11-10 20:49:06 -07:00
Nathan Sobo ee2ea9432a WIP: Probably the wrong direction 2021-11-10 17:44:56 -07:00
Nathan Sobo a7d6c4f848 WIP 2021-11-10 14:00:51 -07:00
54e78b0461 End pending selection when starting a transaction
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-03 19:15:54 +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
7d77e68984 Introduce a status bar and add the cursor position to it
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-03 17:27:51 +01:00
Antonio Scandurra 42921ac2ad Request autoscroll when undoing/redoing 2021-11-03 09:44:23 +01: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 5cb767e73b Rename AnchorRangeSet::to_point_ranges -> point_ranges 2021-10-28 16:32:49 -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 Scandurra 7cd7d52899 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 BrunsfeldandNathan Sobo c6a85f0009 Include diagnostic info in HighlightedChunks iterator
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-26 17:57:50 -07:00
Max Brunsfeld 1fe81e3516 Simplify buffer constructor methods
Don't expose the `buffer::History` to callers of `language::Buffer`
2021-10-26 14:26:47 -07:00