Supermaven enhanced (#11521)

Fixes #11422 by accepting just the start of the line.

Release Notes:

- N/A

---------

Co-authored-by: max <max@zed.dev>
Co-authored-by: jacob <jacob@supermaven.com>
This commit is contained in:
Kyle Kelley 2024-05-07 15:38:03 -07:00 committed by GitHub
parent 33a72219c0
commit 1cf40d77e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 97 additions and 45 deletions

View file

@ -215,12 +215,12 @@ impl InlineCompletionProvider for CopilotCompletionProvider {
}
}
fn active_completion_text(
&self,
fn active_completion_text<'a>(
&'a self,
buffer: &Model<Buffer>,
cursor_position: language::Anchor,
cx: &AppContext,
) -> Option<&str> {
cx: &'a AppContext,
) -> Option<&'a str> {
let buffer_id = buffer.entity_id();
let buffer = buffer.read(cx);
let completion = self.active_completion()?;