Add syntax highlighting for TOML
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
("[" @open "]" @close)
|
||||
("{" @open "}" @close)
|
||||
("\"" @open "\"" @close)
|
||||
@@ -0,0 +1,9 @@
|
||||
name = "TOML"
|
||||
path_suffixes = ["toml"]
|
||||
line_comment = "# "
|
||||
autoclose_before = ",]}"
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "\"", end = "\"", close = true, newline = false },
|
||||
]
|
||||
@@ -0,0 +1,33 @@
|
||||
; Properties
|
||||
;-----------
|
||||
|
||||
(bare_key) @property
|
||||
(quoted_key) @property
|
||||
|
||||
; Literals
|
||||
;---------
|
||||
|
||||
(boolean) @constant
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
(integer) @number
|
||||
(float) @number
|
||||
(offset_date_time) @string.special
|
||||
(local_date_time) @string.special
|
||||
(local_date) @string.special
|
||||
(local_time) @string.special
|
||||
|
||||
; Punctuation
|
||||
;------------
|
||||
|
||||
"." @punctuation.delimiter
|
||||
"," @punctuation.delimiter
|
||||
|
||||
"=" @operator
|
||||
|
||||
"[" @punctuation.bracket
|
||||
"]" @punctuation.bracket
|
||||
"[[" @punctuation.bracket
|
||||
"]]" @punctuation.bracket
|
||||
"{" @punctuation.bracket
|
||||
"}" @punctuation.bracket
|
||||
@@ -0,0 +1,15 @@
|
||||
(table
|
||||
.
|
||||
"["
|
||||
.
|
||||
(_) @name) @item
|
||||
|
||||
(table_array_element
|
||||
.
|
||||
"[["
|
||||
.
|
||||
(_) @name) @item
|
||||
|
||||
(pair
|
||||
.
|
||||
(_) @name) @item
|
||||
Reference in New Issue
Block a user