From f34dca797cf696a19466ab2b3f7e1ca6ffa2bcb7 Mon Sep 17 00:00:00 2001 From: karei Date: Thu, 25 Jul 2024 17:12:55 +0300 Subject: [PATCH] Add support for `jjdescription` files (#11271) --- book/src/generated/lang-support.md | 1 + languages.toml | 13 +++++++++++++ runtime/queries/jjdescription/highlights.scm | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 runtime/queries/jjdescription/highlights.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 5afde0972..686dec5e2 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -96,6 +96,7 @@ | java | ✓ | ✓ | ✓ | `jdtls` | | javascript | ✓ | ✓ | ✓ | `typescript-language-server` | | jinja | ✓ | | | | +| jjdescription | ✓ | | | | | jsdoc | ✓ | | | | | json | ✓ | ✓ | ✓ | `vscode-json-language-server` | | json5 | ✓ | | | | diff --git a/languages.toml b/languages.toml index 5103cee3c..55bb7a4fb 100644 --- a/languages.toml +++ b/languages.toml @@ -3203,6 +3203,19 @@ grammar = "jinja2" name = "jinja2" source = { git = "https://github.com/varpeti/tree-sitter-jinja2", rev = "a533cd3c33aea6acb0f9bf9a56f35dcfe6a8eb53" } +[[language]] +name = "jjdescription" +scope = "jj.description" +file-types = [{ glob = "*.jjdescription" }] +comment-token = "JJ:" +indent = { tab-width = 2, unit = " " } +rulers = [51, 73] +text-width = 72 + +[[grammar]] +name = "jjdescription" +source = { git = "https://github.com/kareigu/tree-sitter-jjdescription", rev = "2ddec6cad07b366aee276a608e1daa2c29d3caf2" } + [[grammar]] name = "wren" source = { git = "https://git.sr.ht/~jummit/tree-sitter-wren", rev = "6748694be32f11e7ec6b5faeb1b48ca6156d4e06" } diff --git a/runtime/queries/jjdescription/highlights.scm b/runtime/queries/jjdescription/highlights.scm new file mode 100644 index 000000000..651f1e7f2 --- /dev/null +++ b/runtime/queries/jjdescription/highlights.scm @@ -0,0 +1,8 @@ +(text) @string +(filepath) @string.special.path + +(change type: "A" @diff.plus) +(change type: "D" @diff.minus) +(change type: "M" @diff.delta) + +(comment) @comment