Extract Clojure support into an extension (#10088)

This PR extracts Clojure support into an extension and removes the
built-in Clojure support from Zed.

Release Notes:

- Removed built-in support for Clojure, in favor of making it available
as an extension. The Clojure extension will be suggested for download
when you open a `.clj` or other Clojure-related files.

---------

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Marshall Bowers 2024-04-02 13:47:03 -04:00 committed by GitHub
parent 46544d7354
commit 6121bfc5a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 158 additions and 157 deletions

View file

@ -0,0 +1,3 @@
("(" @open ")" @close)
("[" @open "]" @close)
("{" @open "}" @close)

View file

@ -0,0 +1,12 @@
name = "Clojure"
grammar = "clojure"
path_suffixes = ["clj", "cljs", "cljc", "edn", "bb"]
line_comments = [";; "]
autoclose_before = "}])"
brackets = [
{ start = "{", end = "}", close = true, newline = true },
{ start = "[", end = "]", close = true, newline = true },
{ start = "(", end = ")", close = true, newline = true },
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
]
word_characters = ["-"]

View file

@ -0,0 +1,41 @@
;; Literals
(num_lit) @number
[
(char_lit)
(str_lit)
] @string
[
(bool_lit)
(nil_lit)
] @constant.builtin
(kwd_lit) @constant
;; Comments
(comment) @comment
;; Treat quasiquotation as operators for the purpose of highlighting.
[
"'"
"`"
"~"
"@"
"~@"
] @operator
(list_lit
.
(sym_lit) @function)
(list_lit
.
(sym_lit) @keyword
(#match? @keyword
"^(do|if|let|var|fn|fn*|loop*|recur|throw|try|catch|finally|set!|new|quote|->|->>)$"
))

View file

@ -0,0 +1,3 @@
(_ "[" "]") @indent
(_ "{" "}") @indent
(_ "(" ")") @indent

View file

@ -0,0 +1 @@