From e7b6cc4197475229ec8ea12ac1156677eb27061d Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 26 Aug 2025 21:33:27 -0400 Subject: [PATCH] Initial commit. --- .gitignore | 3 +++ extension.toml | 11 +++++++++++ languages/scl/brackets.scm | 1 + languages/scl/config.toml | 5 +++++ languages/scl/highlights.scm | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 54 insertions(+) create mode 100644 .gitignore create mode 100644 extension.toml create mode 100644 languages/scl/brackets.scm create mode 100644 languages/scl/config.toml create mode 100644 languages/scl/highlights.scm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2851a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.wasm +/target +/grammars diff --git a/extension.toml b/extension.toml new file mode 100644 index 0000000..da61ac8 --- /dev/null +++ b/extension.toml @@ -0,0 +1,11 @@ +id = "scl" +name = "SCL" +description = "SCL support." +version = "0.1.0" +schema_version = 1 +authors = ["Jacob Signorovitch "] +repository = "https://git.signorovitch.org/jacob/zed-scl" + +[grammars.scl] +repository = "https://git.signorovitch.org/jacob/tree-sitter-scl" +rev = "7cad33405ec41b89a060a6bae7fb437bde99b9ed" diff --git a/languages/scl/brackets.scm b/languages/scl/brackets.scm new file mode 100644 index 0000000..d086b2e --- /dev/null +++ b/languages/scl/brackets.scm @@ -0,0 +1 @@ +("(" @open ")" @close) diff --git a/languages/scl/config.toml b/languages/scl/config.toml new file mode 100644 index 0000000..ceea231 --- /dev/null +++ b/languages/scl/config.toml @@ -0,0 +1,5 @@ +name = "SCL" +grammar = "scl" +path_suffixes = ["scl"] +line_comments = ["# "] +brackets = [{ start = "(", end = ")", close = true, newline = true }] diff --git a/languages/scl/highlights.scm b/languages/scl/highlights.scm new file mode 100644 index 0000000..137821d --- /dev/null +++ b/languages/scl/highlights.scm @@ -0,0 +1,34 @@ +;; Numbers. +(num) @number + +;; Function names when defining. +(funcdef name: (word) @function) + +;; Function calls. +(callexp fn: (word) @function) + +;; Variables. +(word) @variable + +;; Parameters inside function/lambda. +(params (word) @variable) + +;; Operators. +[ + "+" + "-" + "*" + "/" + "=" +] @operator + +;; Lambdas. +"\\" @keyword + +;; Other keywords. + +;; Parentheses. +[ "(" ")" ] @punctuation.bracket + +;; Commas. +"," @punctuation.delimiter