Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r--crates/ide/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index d4ef9570e1..b43685ffee 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -410,14 +410,16 @@ impl Analysis {
&self,
position: FilePosition,
char_typed: char,
- autoclose: bool,
+ chars_to_exclude: Option<String>,
) -> Cancellable<Option<SourceChange>> {
// Fast path to not even parse the file.
if !typing::TRIGGER_CHARS.contains(char_typed) {
return Ok(None);
}
- if char_typed == '<' && !autoclose {
- return Ok(None);
+ if let Some(chars_to_exclude) = chars_to_exclude {
+ if chars_to_exclude.contains(char_typed) {
+ return Ok(None);
+ }
}
self.with_db(|db| typing::on_char_typed(db, position, char_typed))