Commit Graph
267 Commits
Author SHA1 Message Date
Max Brunsfeld 2c14c1a0ce Fix enclosing-bracket bug that appeared in JS for loops
Previously, we were relying on the tree-sitter query's range restriction to
avoid returning brackets that did not contain the given range. But the
query's range restriction only guarantees that we don't descend into parent
nodes unless they intersect the range.
2022-11-23 13:37:22 -08:00
Max BrunsfeldandKay Simmons a491a27b62 Add basic support for ruby
Co-authored-by: Kay Simmons <kay@zed.dev>
2022-11-03 15:52:33 -07:00
Julia 93d7f4d262 Merge pull request #1800 from zed-industries/go-to-diff-hunk
Add action to go to next/previous git diff in editor
2022-10-31 14:38:52 -04:00
Max Brunsfeld 4df8c58951 Fix panic when hitting tab at the beginning of a line with mixed tab/space indent 2022-10-31 10:51:20 -07:00
Julia 985758426d Add test for go-to hunk and fix discovered bugs 2022-10-28 15:08:13 -04:00
JuliaandKay Simmons 412c77460e Add action to go to next/previous git diff in editor
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-10-28 15:08:13 -04:00
Mikayla Maki c59df65e85 Merge branch 'main' into breadcrumbs 2022-10-17 16:51:38 -07:00
K Simmons 55b9eff3df Add cursor blink setting and replicate cursor shape to remote collaborators 2022-10-17 16:20:47 -07:00
Mikayla Maki f23f3ad9f8 fixed a bug where files outside of the project would show 'untitled' in the search bar 2022-10-17 12:58:48 -07:00
Max Brunsfeld a2c9a67558 Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Antonio Scandurra ff0f0c94f3 Clear auto-indent requests if they couldn't be computed 2022-10-12 10:53:44 +02:00
Mikayla Maki a2a958ccdc Moved settings_file.rs into settings crate. Should be ready to start now :D 2022-10-11 16:03:38 -07:00
Mikayla Maki a9ce687031 Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
JuliaandJoseph Lyons 9905d9833c Reset buffer git diff when setting diff base to None
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2022-10-07 15:37:37 -04:00
Max Brunsfeld 260e5e66e8 Apply buffer diff edits as a single batch 2022-10-06 11:54:28 -07:00
Max Brunsfeld 428e05a5fa Merge pull request #1404 from zed-industries/html-support
Basic html support
2022-10-06 10:32:44 -07:00
Max Brunsfeld 225f341f0a Derive indent size from the language at the cursor when auto-indenting 2022-10-05 17:07:35 -07:00
Max Brunsfeld 30cf42d108 Finish generalizing ToggleComments to support block comments 2022-10-05 12:25:32 -07:00
JuliaandMikayla Maki 0615592f81 Rename head text to indicate that it's not always going to be from head
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-10-03 15:11:06 -04:00
c15e29be64 WIP Start refactoring separation of concerns for repo metadata
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-30 18:25:25 -04:00
484bdb0fc0 Start a test for remote git data updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-30 15:51:32 -04:00
Mikayla Maki ab3f820edc WIP, re-doing fs and fake git repos 2022-09-29 13:16:02 -04:00
JuliaandMikayla Maki 1da2b63b97 Move git related things into specialized git crate
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia 5527234e06 Build again 2022-09-29 13:16:02 -04:00
JuliaandMikayla Maki 51d8a04748 WIP Notifying buffers of head text change
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
JuliaandMikayla Maki f53a544038 Avoid racing git diffs & allow for "as fast as possible" diff updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia 3eadb80c9a Fully qualify outside git-related code when a diff is a git diff 2022-09-29 13:16:02 -04:00
Julia 9d777c74f2 Perform initial file load git diff async 2022-09-29 13:16:02 -04:00
Julia 6d23cbedc2 Properly invalidate when async git diff completes 2022-09-29 13:16:02 -04:00
Julia 8c17183c5a Changed diffs to be async and dropped git delay 2022-09-29 13:16:02 -04:00
Julia eb8c304418 Move diff logic back into BufferDiff::update 2022-09-29 13:16:02 -04:00
JuliaandMax Brunsfeld 60bff07555 Move cloneable diff state into new snapshot type
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-29 13:16:02 -04:00
Julia 1853e15a73 Checkpoint on incremental diff sumtree shenanigans 2022-09-29 13:16:02 -04:00
JuliaandMax Brunsfeld 26464ad25b Update git gutter status after debounced delay
Co-authored-by: Max Brunsfeld <max@zed.com>
2022-09-29 13:16:02 -04:00
JuliaandMax Brunsfeld 745b30e6e9 Start painting some sort of hunk info, it's wrong but it's close
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-29 13:16:01 -04:00
ForLoveOfCats d7fbe9b084 Load a file's head text on file load just to get started 2022-09-29 13:16:01 -04:00
Max Brunsfeld be3f274785 Make Buffer::language_at fall back to Buffer::language
For languages with no grammar (plain text), there
will be no layers.
2022-09-28 13:38:54 -07:00
Max BrunsfeldandJulia Risley 09e9b4e1a1 Add Buffer::language_at, update MultiBuffer to use it
Co-authored-by: Julia Risley <floc@unpromptedtirade.com>
2022-09-28 12:32:04 -07:00
Max Brunsfeld 28356223a5 Tweak HTML indents and highlights 2022-09-28 12:32:04 -07:00
Max Brunsfeld ed323dbfd9 Fix crash when querying for enclosing brackets at EOF 2022-09-02 10:23:46 -07:00
Max Brunsfeld 13cf937778 Merge pull request #1559 from zed-industries/language-injection
Add language injection support
2022-08-30 11:54:00 -07:00
Max Brunsfeld 67a565580e Fix test about auto-indent with no indent query 2022-08-24 15:29:07 -07:00
Max Brunsfeld 9c23ca0d98 Clean up some of buffer's syntax-related methods 2022-08-24 15:11:26 -07:00
Max Brunsfeld 373f434075 Fix out-of-range panic when requesting outline items at EOF 2022-08-24 15:10:53 -07:00
Max Brunsfeld 80ac53d83d Use SyntaxMap in Buffer 2022-08-24 13:00:27 -07:00
Antonio Scandurra 89b54e5272 Move operation serialization off the main thread 2022-08-23 16:34:25 +02:00
Antonio Scandurra ce4bb4e715 Stream buffer ops in the background when creating buffer for peers 2022-08-23 16:05:56 +02:00
Antonio Scandurra 9aa646cc86 Simplify proto::Buffer to express its fields in terms of operations 2022-08-23 12:40:20 +02:00
Max Brunsfeld 94eb0d6c55 Start work on a SyntaxMap data structure 2022-08-21 11:37:10 -07:00
Antonio Scandurra 2e7bfd19c1 Create buffers for remote collaborators out of band
Previously, we would use `Project::serialize_buffer_for_peer` and
`Project::deserialize_buffer` respectively in the host and in the
guest to create a new buffer or just send its ID if the host thought
the buffer had already been sent.

These methods would be called as part of other methods, such as
`Project::open_buffer_by_id` or `Project::open_buffer_for_symbol`.
However, if any of the tasks driving the futures that eventually
called `Project::deserialize_buffer` were dropped after the host
responded with the buffer state but (crucially) before the guest
deserialized it and registered it, there could be a situation where
the host thought the guest had the buffer (thus sending them just the
buffer id) and the guest would wait indefinitely.

Given how crucial this interaction is, this commit switches to creating
remote buffers for peers out of band. The host will push buffers to guests,
who will always refer to buffers via IDs and wait for the host to send them,
as opposed to including the buffer's payload as part of some other operation.
2022-08-17 11:55:36 +02:00