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

- Add auto close to single quote string
- Add syntax highlights to escape sequence
This commit is contained in:
狐狸 2024-09-24 03:39:01 +08:00 committed by GitHub
parent 7051bc00c2
commit 1ff10b71c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -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 = "--[ ... ]--"

View file

@ -196,3 +196,4 @@
(number) @number
(string) @string
(escape_sequence) @string.escape