Detailed changes
@@ -136,6 +136,46 @@ pub static PLAIN_TEXT: LazyLock<Arc<Language>> = LazyLock::new(|| {
path_suffixes: vec!["txt".to_owned()],
first_line_pattern: None,
},
+ brackets: BracketPairConfig {
+ pairs: vec![
+ BracketPair {
+ start: "(".to_string(),
+ end: ")".to_string(),
+ close: true,
+ surround: true,
+ newline: false,
+ },
+ BracketPair {
+ start: "[".to_string(),
+ end: "]".to_string(),
+ close: true,
+ surround: true,
+ newline: false,
+ },
+ BracketPair {
+ start: "{".to_string(),
+ end: "}".to_string(),
+ close: true,
+ surround: true,
+ newline: false,
+ },
+ BracketPair {
+ start: "\"".to_string(),
+ end: "\"".to_string(),
+ close: true,
+ surround: true,
+ newline: false,
+ },
+ BracketPair {
+ start: "'".to_string(),
+ end: "'".to_string(),
+ close: true,
+ surround: true,
+ newline: false,
+ },
+ ],
+ disabled_scopes_by_bracket_ix: Default::default(),
+ },
..Default::default()
},
None,
@@ -4,9 +4,10 @@ path_suffixes = ["json", "flake.lock"]
line_comments = ["// "]
autoclose_before = ",]}"
brackets = [
- { start = "{", end = "}", close = true, newline = true },
- { start = "[", end = "]", close = true, newline = true },
- { start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
+ { start = "{", end = "}", close = true, surround = true, newline = true },
+ { start = "[", end = "]", close = true, surround = true, newline = true },
+ { start = "(", end = ")", close = true, surround = true, newline = false },
+ { start = "\"", end = "\"", close = true, surround = true, newline = false, not_in = ["string"] },
]
tab_size = 2
prettier_parser_name = "json"
@@ -4,9 +4,10 @@ path_suffixes = ["jsonc", "bun.lock", "tsconfig.json", "pyrightconfig.json"]
line_comments = ["// "]
autoclose_before = ",]}"
brackets = [
- { start = "{", end = "}", close = true, newline = true },
- { start = "[", end = "]", close = true, newline = true },
- { start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
+ { start = "{", end = "}", close = true, surround = true, newline = true },
+ { start = "[", end = "]", close = true, surround = true, newline = true },
+ { start = "(", end = ")", close = true, surround = true, newline = false },
+ { start = "\"", end = "\"", close = true, surround = true, newline = false, not_in = ["string"] },
]
tab_size = 2
prettier_parser_name = "jsonc"