Initial commit.
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.wasm
|
||||||
|
/target
|
||||||
|
/grammars
|
11
extension.toml
Normal file
11
extension.toml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
id = "scl"
|
||||||
|
name = "SCL"
|
||||||
|
description = "SCL support."
|
||||||
|
version = "0.1.0"
|
||||||
|
schema_version = 1
|
||||||
|
authors = ["Jacob Signorovitch <jacob.signorovitch@gmail.com>"]
|
||||||
|
repository = "https://git.signorovitch.org/jacob/zed-scl"
|
||||||
|
|
||||||
|
[grammars.scl]
|
||||||
|
repository = "https://git.signorovitch.org/jacob/tree-sitter-scl"
|
||||||
|
rev = "7cad33405ec41b89a060a6bae7fb437bde99b9ed"
|
1
languages/scl/brackets.scm
Normal file
1
languages/scl/brackets.scm
Normal file
@@ -0,0 +1 @@
|
|||||||
|
("(" @open ")" @close)
|
5
languages/scl/config.toml
Normal file
5
languages/scl/config.toml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
name = "SCL"
|
||||||
|
grammar = "scl"
|
||||||
|
path_suffixes = ["scl"]
|
||||||
|
line_comments = ["# "]
|
||||||
|
brackets = [{ start = "(", end = ")", close = true, newline = true }]
|
34
languages/scl/highlights.scm
Normal file
34
languages/scl/highlights.scm
Normal file
@@ -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
|
Reference in New Issue
Block a user