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:
parent
46544d7354
commit
6121bfc5a4
16 changed files with 158 additions and 157 deletions
3
extensions/clojure/languages/clojure/brackets.scm
Normal file
3
extensions/clojure/languages/clojure/brackets.scm
Normal file
|
@ -0,0 +1,3 @@
|
|||
("(" @open ")" @close)
|
||||
("[" @open "]" @close)
|
||||
("{" @open "}" @close)
|
12
extensions/clojure/languages/clojure/config.toml
Normal file
12
extensions/clojure/languages/clojure/config.toml
Normal 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 = ["-"]
|
41
extensions/clojure/languages/clojure/highlights.scm
Normal file
41
extensions/clojure/languages/clojure/highlights.scm
Normal 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|->|->>)$"
|
||||
))
|
3
extensions/clojure/languages/clojure/indents.scm
Normal file
3
extensions/clojure/languages/clojure/indents.scm
Normal file
|
@ -0,0 +1,3 @@
|
|||
(_ "[" "]") @indent
|
||||
(_ "{" "}") @indent
|
||||
(_ "(" ")") @indent
|
1
extensions/clojure/languages/clojure/outline.scm
Normal file
1
extensions/clojure/languages/clojure/outline.scm
Normal file
|
@ -0,0 +1 @@
|
|||
|
Loading…
Add table
Add a link
Reference in a new issue