diff options
| author | Omar Valdez <omarantoniovaldezf2@gmail.com> | 2024-08-31 19:24:08 -0700 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-10-15 09:16:44 +0200 |
| commit | 96290ae7ea0d24b9611e8e81a80736e577d41cd9 (patch) | |
| tree | 98d11faa5fb03cb6395e4205b8e6f998d0d87a2a | |
| parent | bot(lockfile): update agda, bash, c, c_sharp, cmake, cpp, css, diff, editorco... (diff) | |
| download | nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.tar nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.tar.gz nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.tar.bz2 nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.tar.lz nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.tar.xz nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.tar.zst nvim-treesitter-96290ae7ea0d24b9611e8e81a80736e577d41cd9.zip | |
refactor(toml): highlight queries
| -rw-r--r-- | queries/toml/highlights.scm | 74 |
1 files changed, 39 insertions, 35 deletions
diff --git a/queries/toml/highlights.scm b/queries/toml/highlights.scm index 1370f9121..f0a5177a7 100644 --- a/queries/toml/highlights.scm +++ b/queries/toml/highlights.scm @@ -1,54 +1,58 @@ -; Properties -;----------- -(bare_key) @type +(table + [ + (bare_key) @markup.heading + (dotted_key + (bare_key) @markup.heading) + ]) -(quoted_key) @string +(table_array_element + [ + (bare_key) @markup.heading + (dotted_key + (bare_key) @markup.heading) + ]) (pair - (bare_key)) @property + [ + (bare_key) @property + (dotted_key + (bare_key) @property) + ]) -(pair - (dotted_key - (bare_key) @property)) +[ + (string) + (quoted_key) +] @string -; Literals -;--------- (boolean) @boolean (comment) @comment @spell -(string) @string - (escape_sequence) @string.escape (integer) @number (float) @number.float -(offset_date_time) @string.special - -(local_date_time) @string.special - -(local_date) @string.special - -(local_time) @string.special - -; Punctuation -;------------ -"." @punctuation.delimiter - -"," @punctuation.delimiter +[ + (local_date) + (local_date_time) + (local_time) + (offset_date_time) +] @string.special "=" @operator -"[" @punctuation.bracket - -"]" @punctuation.bracket - -"[[" @punctuation.bracket - -"]]" @punctuation.bracket - -"{" @punctuation.bracket +[ + "." + "," +] @punctuation.delimiter -"}" @punctuation.bracket +[ + "[" + "]" + "[[" + "]]" + "{" + "}" +] @punctuation.bracket |
