From aeaeb09f486c2bc7f8c563bceece03a0954576b9 Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Sun, 27 Aug 2023 01:43:18 +0300 Subject: [PATCH] add gemini language support (#8070) --- book/src/generated/lang-support.md | 1 + languages.toml | 10 ++++++++++ runtime/queries/gemini/highlights.scm | 26 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 runtime/queries/gemini/highlights.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 1287c11ff..596b62bab 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -45,6 +45,7 @@ | fortran | ✓ | | ✓ | `fortls` | | fsharp | ✓ | | | `fsautocomplete` | | gdscript | ✓ | ✓ | ✓ | | +| gemini | ✓ | | | | | git-attributes | ✓ | | | | | git-commit | ✓ | ✓ | | | | git-config | ✓ | | | | diff --git a/languages.toml b/languages.toml index ca8e68154..c0b4bc6e7 100644 --- a/languages.toml +++ b/languages.toml @@ -2794,3 +2794,13 @@ roots = [] [[grammar]] name = "strace" source = { git = "https://github.com/sigmaSd/tree-sitter-strace", rev = "a0f6c50ae4087a9299f055d0f30fe94fd98189a4" } + +[[language]] +name = "gemini" +scope = "source.gmi" +file-types = ["gmi"] +roots = [] + +[[grammar]] +name = "gemini" +source = { git = "https://git.sr.ht/~sfr/tree-sitter-gemini", rev = "3cc5e4bdf572d5df4277fc2e54d6299bd59a54b3" } diff --git a/runtime/queries/gemini/highlights.scm b/runtime/queries/gemini/highlights.scm new file mode 100644 index 000000000..f98c85326 --- /dev/null +++ b/runtime/queries/gemini/highlights.scm @@ -0,0 +1,26 @@ +(link) @punctuation.bracket +(link + label: (text) @markup.link.label) +(link + uri: (uri) @markup.link.url) + +[ + (start_pre) + (pre) + (end_pre) +] @markup.raw.block +(start_pre + alt: (text) @label) + +(heading1 + (text) @markup.heading.1) @markup.heading.marker +(heading2 + (text) @markup.heading.2) @markup.heading.marker +(heading3 + (text) @markup.heading.3) @markup.heading.marker + +(ulist + (indicator) @markup.list.unnumbered) +(quote + (indicator) @markup.quote + (text) @markup.italic)