ZIm/crates/language/src
Max Brunsfeld a2115e7242
Restructure git diff state management to allow viewing buffers with different diff bases (#21258)
This is a pure refactor of our Git diff state management. Buffers are no
longer are associated with one single diff (the unstaged changes).
Instead, there is an explicit project API for retrieving a buffer's
unstaged changes, and the `Editor` view layer is responsible for
choosing what diff to associate with a buffer.

The reason for this change is that we'll soon want to add multiple "git
diff views" to Zed, one of which will show the *uncommitted* changes for
a buffer. But that view will need to co-exist with other views of the
same buffer, which may want to show the unstaged changes.

### Todo

* [x] Get git gutter and git hunks working with new structure
* [x] Update editor tests to use new APIs
* [x] Update buffer tests
* [x] Restructure remoting/collab protocol
* [x] Update assertions about staged text in
`random_project_collaboration_tests`
* [x] Move buffer tests for git diff management to a new spot, using the
new APIs

Release Notes:

- N/A

---------

Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Cole <cole@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
2024-12-04 15:02:33 -08:00
..
syntax_map Replace Default trait bound with a zero function on Summary/Dimension (#17975) 2024-09-17 19:43:59 -06:00
buffer.rs Restructure git diff state management to allow viewing buffers with different diff bases (#21258) 2024-12-04 15:02:33 -08:00
buffer_tests.rs Restructure git diff state management to allow viewing buffers with different diff bases (#21258) 2024-12-04 15:02:33 -08:00
diagnostic_set.rs Pass Summary::Context to Item::summarize (#18510) 2024-09-29 10:30:48 -06:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
language_registry.rs Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
language_settings.rs Add setting to disable inline completions in language scopes (#20508) 2024-11-11 18:09:05 +01:00
markdown.rs Markdown preview image rendering (#21082) 2024-11-22 14:49:26 -08:00
outline.rs Extract outline rendering to outline crate (#20179) 2024-11-04 11:54:37 -05:00
proto.rs lsp: Track completion triggers for each language separately (#20471) 2024-11-10 10:29:10 +01:00
syntax_map.rs Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
task_context.rs tasks: Add ability to query active toolchains for languages (#20667) 2024-11-14 14:37:37 +01:00
toolchain.rs toolchains: Run listing tasks on background thread (#21414) 2024-12-02 21:03:31 +01:00