Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

lua: Add auto-close for single quote strings and highlight escape sequences (#18199)

狐狸1ff10b71c8ea
diff --git a/extensions/lua/languages/lua/config.toml b/extensions/lua/languages/lua/config.toml
index 6c3aee09ea7..7ec8ef2f03f 100644
--- a/extensions/lua/languages/lua/config.toml
+++ b/extensions/lua/languages/lua/config.toml
@@ -8,6 +8,6 @@ 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 = false, newline = false, not_in = ["string"] },
+ { start = "'", end = "'", close = true, newline = false, not_in = ["string"] },
]
collapsed_placeholder = "--[ ... ]--"
diff --git a/extensions/lua/languages/lua/highlights.scm b/extensions/lua/languages/lua/highlights.scm
index 98e2c2eaff6..7b0b8364ea2 100644
--- a/extensions/lua/languages/lua/highlights.scm
+++ b/extensions/lua/languages/lua/highlights.scm
@@ -196,3 +196,4 @@
(number) @number
(string) @string
+(escape_sequence) @string.escape