From f537be470409440eb36463eeded931d2e1004b33 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Fri, 26 Jan 2024 16:20:40 +0100 Subject: [PATCH] Fix bracket captures for Go, C, C++, and Zig This fixes #6702 by adding the captures for Go, C, C++, and Zig. Witness-by: David --- crates/zed/src/languages/c/brackets.scm | 1 + crates/zed/src/languages/cpp/brackets.scm | 1 + crates/zed/src/languages/go/brackets.scm | 1 + crates/zed/src/languages/zig/brackets.scm | 3 +++ 4 files changed, 6 insertions(+) create mode 100644 crates/zed/src/languages/zig/brackets.scm diff --git a/crates/zed/src/languages/c/brackets.scm b/crates/zed/src/languages/c/brackets.scm index 9e8c9cd93c..2fbfd44362 100644 --- a/crates/zed/src/languages/c/brackets.scm +++ b/crates/zed/src/languages/c/brackets.scm @@ -1,3 +1,4 @@ +("(" @open ")" @close) ("[" @open "]" @close) ("{" @open "}" @close) ("\"" @open "\"" @close) diff --git a/crates/zed/src/languages/cpp/brackets.scm b/crates/zed/src/languages/cpp/brackets.scm index 9e8c9cd93c..2fbfd44362 100644 --- a/crates/zed/src/languages/cpp/brackets.scm +++ b/crates/zed/src/languages/cpp/brackets.scm @@ -1,3 +1,4 @@ +("(" @open ")" @close) ("[" @open "]" @close) ("{" @open "}" @close) ("\"" @open "\"" @close) diff --git a/crates/zed/src/languages/go/brackets.scm b/crates/zed/src/languages/go/brackets.scm index 9e8c9cd93c..2fbfd44362 100644 --- a/crates/zed/src/languages/go/brackets.scm +++ b/crates/zed/src/languages/go/brackets.scm @@ -1,3 +1,4 @@ +("(" @open ")" @close) ("[" @open "]" @close) ("{" @open "}" @close) ("\"" @open "\"" @close) diff --git a/crates/zed/src/languages/zig/brackets.scm b/crates/zed/src/languages/zig/brackets.scm new file mode 100644 index 0000000000..191fd9c084 --- /dev/null +++ b/crates/zed/src/languages/zig/brackets.scm @@ -0,0 +1,3 @@ +("(" @open ")" @close) +("[" @open "]" @close) +("{" @open "}" @close)