From b25eb9afe2812b24346482ec8e45ae9f4ed644b0 Mon Sep 17 00:00:00 2001 From: vali-pnt Date: Mon, 6 May 2024 19:33:44 +0300 Subject: [PATCH] zig: Fix syntax and file types (#11409) Fixed autoclosing and made it recognize all ZON (Zig Object Notation) files. - Fixed single and double quotes not autoclosing for zig - Fixed ZON file recognition - Removed angle brackets autoclosing in zig as they are not used Release Notes: - N/A --- extensions/zig/languages/zig/config.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/zig/languages/zig/config.toml b/extensions/zig/languages/zig/config.toml index ea57482f43..1ce1b215a0 100644 --- a/extensions/zig/languages/zig/config.toml +++ b/extensions/zig/languages/zig/config.toml @@ -1,11 +1,12 @@ name = "Zig" grammar = "zig" -path_suffixes = ["zig", "zig.zon"] +path_suffixes = ["zig", "zon"] line_comments = ["// "] -autoclose_before = ";:.,=}])>" +autoclose_before = ";:.,=}])" brackets = [ { start = "{", end = "}", close = true, newline = true }, { start = "[", end = "]", close = true, newline = true }, { 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, newline = false, not_in = ["string", "comment"] }, ]