From 07816afdbe7961919b94c1d38da9f7e1bd65f655 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 24 Feb 2025 12:20:13 -0500 Subject: [PATCH] AutoYADM commit: 2025-02-24 12:20:13 --- .../helix/runtime/queries/toml/highlights.scm | 48 +++++++++++++++++++ .../helix/runtime/queries/toml/injections.scm | 2 + .../runtime/queries/toml/textobjects.scm | 7 +++ 3 files changed, 57 insertions(+) create mode 100644 .config/helix/runtime/queries/toml/highlights.scm create mode 100644 .config/helix/runtime/queries/toml/injections.scm create mode 100644 .config/helix/runtime/queries/toml/textobjects.scm diff --git a/.config/helix/runtime/queries/toml/highlights.scm b/.config/helix/runtime/queries/toml/highlights.scm new file mode 100644 index 00000000..e0a3d6a1 --- /dev/null +++ b/.config/helix/runtime/queries/toml/highlights.scm @@ -0,0 +1,48 @@ +; Properties +;----------- + +(table [ + (bare_key) + (dotted_key) + (quoted_key) +] @type) + +(table_array_element [ + (bare_key) + (dotted_key) + (quoted_key) +] @type) + +(pair [ + (bare_key) + (dotted_key) + (quoted_key) +] @variable.other.member) + +; Literals +;--------- + +(boolean) @constant.builtin.boolean +(comment) @comment +(string) @string +(integer) @constant.numeric.integer +(float) @constant.numeric.float +(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 diff --git a/.config/helix/runtime/queries/toml/injections.scm b/.config/helix/runtime/queries/toml/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/.config/helix/runtime/queries/toml/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/.config/helix/runtime/queries/toml/textobjects.scm b/.config/helix/runtime/queries/toml/textobjects.scm new file mode 100644 index 00000000..5b88d81c --- /dev/null +++ b/.config/helix/runtime/queries/toml/textobjects.scm @@ -0,0 +1,7 @@ +(pair + (_) @entry.inside) @entry.around + +(array + (_) @entry.around) + +(comment)+ @comment.around