feat: add more auto closing pairs, surrounding pairs, and characters that could make auto closing before (#209)

* dev: add more characters that could make auto closing before

* dev: add more auto closing pairs and surrounding pairs

* dev: remove a debugging log

* dev: add a comment
This commit is contained in:
Myriad-Dreamin 2024-04-21 10:53:55 +08:00 committed by GitHub
parent 786814b09c
commit 4227f864a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 4 deletions

View file

@ -1280,7 +1280,7 @@ impl<'a, 'b> TypeSimplifier<'a, 'b> {
let mut lbs = Vec::with_capacity(w.lbs.len());
let mut ubs = Vec::with_capacity(w.ubs.len());
log::info!(
log::debug!(
"transform var [principal={}] {v:?} with {w:?}",
self.principal
);

View file

@ -426,6 +426,8 @@ impl Init {
definition_provider: Some(OneOf::Left(true)),
references_provider: Some(OneOf::Left(true)),
completion_provider: Some(CompletionOptions {
// Please update the language-configurations.json if you are changing this
// setting.
trigger_characters: Some(vec![
String::from("#"),
String::from("("),

View file

@ -30,9 +30,22 @@
"open": "$",
"close": "$",
"notIn": ["string"]
}
},
["“", "”"],
["", ""],
["《", "》"],
["〈", "〉"],
["", ""],
["『", "』"],
["「", "」"],
["【", "】"],
["〖", "〗"],
["", ""],
["", ""],
["", ""]
],
"autoCloseBefore": "$ \n\t",
"autoCloseBefore": ";:.,=}])>$ \n\t",
"surroundingPairs": [
["[", "]"],
["{", "}"],
@ -41,6 +54,19 @@
["*", "*"],
["_", "_"],
["`", "`"],
["$", "$"]
["$", "$"],
["“", "”"],
["", ""],
["《", "》"],
["〈", "〉"],
["", ""],
["『", "』"],
["「", "」"],
["【", "】"],
["〖", "〗"],
["", ""],
["", ""],
["", ""]
]
}