file_finder: Remove common segments of long paths in search results (#25049)
This PR makes progress on #7711 by identifying any common prefix of the paths in the file finder's search results, and replacing the "interior" of that prefix---every path segment but the first and last---with `...`, when a heuristic indicates that the longest path would otherwise overflow the modal. The elision is not applied to any segment that contains a match for the search query. There may be more work to do on #7711 in the case of long result paths that do not share a significant common prefix. Release Notes: - Improved display of long paths in the file finder modal Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
80458ffb96
commit
9ef0501853
49 changed files with 207 additions and 157 deletions
|
@ -1201,7 +1201,6 @@ impl LocalLspStore {
|
|||
Ok(project_transaction)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn execute_formatters(
|
||||
lsp_store: WeakEntity<LspStore>,
|
||||
formatters: &[Formatter],
|
||||
|
@ -1451,7 +1450,6 @@ impl LocalLspStore {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn format_via_lsp(
|
||||
this: &WeakEntity<LspStore>,
|
||||
buffer: &Entity<Buffer>,
|
||||
|
@ -2960,7 +2958,6 @@ impl LspStore {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new_local(
|
||||
buffer_store: Entity<BufferStore>,
|
||||
worktree_store: Entity<WorktreeStore>,
|
||||
|
@ -3054,7 +3051,6 @@ impl LspStore {
|
|||
})
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) fn new_remote(
|
||||
buffer_store: Entity<BufferStore>,
|
||||
worktree_store: Entity<WorktreeStore>,
|
||||
|
@ -4485,7 +4481,6 @@ impl LspStore {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn resolve_completion_remote(
|
||||
project_id: u64,
|
||||
server_id: LanguageServerId,
|
||||
|
@ -7546,7 +7541,6 @@ impl LspStore {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn insert_newly_running_language_server(
|
||||
&mut self,
|
||||
adapter: Arc<CachedLspAdapter>,
|
||||
|
|
|
@ -971,7 +971,6 @@ impl Project {
|
|||
.await
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn from_join_project_response(
|
||||
response: TypedEnvelope<proto::JoinProjectResponse>,
|
||||
subscriptions: [EntitySubscription; 5],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue