Document main workspace structs (#9772)

This commit is contained in:
Kirill Bulatov 2024-03-25 16:09:51 +01:00 committed by GitHub
parent f83884518a
commit e3894a4e1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 31 additions and 0 deletions

View file

@ -141,6 +141,11 @@ pub enum OpenedBufferEvent {
Err(BufferId, Arc<anyhow::Error>),
}
/// Semantics-aware entity that is relevant to one or more [`Worktree`] with the files.
/// `Project` is responsible for tasks, LSP and collab queries, synchronizing worktree states accordingly.
/// Maps [`Worktree`] entries with its own logic using [`ProjectEntryId`] and [`ProjectPath`] structs.
///
/// Can be either local (for the project opened on the same host) or remote.(for collab projects, browsed by multiple remote users).
pub struct Project {
worktrees: Vec<WorktreeHandle>,
active_entry: Option<ProjectEntryId>,