Automatically expand context for inline assistant to nearest block (#27282)
Release Notes: - Inline assistant will now expand empty selections to the block under the cursor. Co-authored-by: andrew j <andjones100@gmail.com>
This commit is contained in:
parent
c783fd072f
commit
90649fbc89
3 changed files with 72 additions and 4 deletions
|
@ -887,6 +887,12 @@ pub struct BracketPairConfig {
|
|||
pub disabled_scopes_by_bracket_ix: Vec<Vec<String>>,
|
||||
}
|
||||
|
||||
impl BracketPairConfig {
|
||||
pub fn is_closing_brace(&self, c: char) -> bool {
|
||||
self.pairs.iter().any(|pair| pair.end.starts_with(c))
|
||||
}
|
||||
}
|
||||
|
||||
fn bracket_pair_config_json_schema(gen: &mut SchemaGenerator) -> Schema {
|
||||
Option::<Vec<BracketPairContent>>::json_schema(gen)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue