Allow specifying a custom limit for /search results (#12423)
<img width="497" alt="image" src="https://github.com/zed-industries/zed/assets/482957/94e94326-fb3c-4f9b-b4d9-7dd6f6f8d537"> e.g. ``` /search --9 foobar ``` Release Notes: - N/A
This commit is contained in:
parent
f3e6a0beab
commit
a0644ac601
5 changed files with 93 additions and 49 deletions
|
@ -2,7 +2,7 @@ mod slash_command_registry;
|
|||
|
||||
use anyhow::Result;
|
||||
use gpui::{AnyElement, AppContext, ElementId, Task, WeakView, WindowContext};
|
||||
use language::LspAdapterDelegate;
|
||||
use language::{CodeLabel, LspAdapterDelegate};
|
||||
pub use slash_command_registry::*;
|
||||
use std::{
|
||||
ops::Range,
|
||||
|
@ -16,6 +16,9 @@ pub fn init(cx: &mut AppContext) {
|
|||
|
||||
pub trait SlashCommand: 'static + Send + Sync {
|
||||
fn name(&self) -> String;
|
||||
fn label(&self, _cx: &AppContext) -> CodeLabel {
|
||||
CodeLabel::plain(self.name(), None)
|
||||
}
|
||||
fn description(&self) -> String;
|
||||
fn tooltip_text(&self) -> String;
|
||||
fn complete_argument(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue