Summary
Add Clojure support via tree-sitter + LSP enrichment, complementing existing Java/Kotlin/Scala support in the JVM ecosystem.
Tooling
| Component |
Tool |
Notes |
| Tree-sitter grammar |
tree-sitter-clojure |
Stable, well-tested |
| LSP server |
clojure-lsp |
Excellent, 1.5k+ stars, very active |
| SCIP indexer |
None |
N/A |
What to implement
Language notes
- Clojure is homoiconic — code is data. Function calls are
(function-name arg1 arg2) (first element of a list)
- Namespace-qualified symbols:
my.namespace/my-fn — the extractor should preserve the full qualified name and also record the bare name
.clj = JVM Clojure, .cljs = ClojureScript (JavaScript target), .cljc = reader conditionals (both targets)
- Thread-first
-> and thread-last ->> macros create call chains analogous to pipe operators
- Multimethod dispatch (
defmulti/defmethod) creates virtual-dispatch relationship edges
- clojure-lsp provides excellent go-to-definition, find-references, and rename across namespaces
Context
Complements existing Java/Kotlin/Scala support. Clojure runs on the JVM and frequently interops with Java libraries. ClojureScript shares dependencies with JavaScript/TypeScript projects.
Summary
Add Clojure support via tree-sitter + LSP enrichment, complementing existing Java/Kotlin/Scala support in the JVM ecosystem.
Tooling
tree-sitter-clojureclojure-lspWhat to implement
tree-sitter-clojureas an npm dependencysrc/indexer/extractors/clojure.ts:(defn name ...)as function symbols(def name ...)as variable/constant symbols(defmacro name ...)as macro symbols(defprotocol Name ...)as interface symbols(defrecord Name ...)and(deftype Name ...)as class/type symbols(defmethod name dispatch-val ...)as method symbols(require '[ns.path :as alias]),(use ...),(import ...)as imports(ns name (:require ...))namespace declarationclojureinSourceIndexStageEXTRACTORS map andParserPoolLANG_PACKAGESclojure-lsptosrc/indexer/lsp/registry.ts:{ command: 'clojure-lsp', args: [] }.clj,.cljs,.cljc,.ednto walkertests/fixtures/clojure/Language notes
(function-name arg1 arg2)(first element of a list)my.namespace/my-fn— the extractor should preserve the full qualified name and also record the bare name.clj= JVM Clojure,.cljs= ClojureScript (JavaScript target),.cljc= reader conditionals (both targets)->and thread-last->>macros create call chains analogous to pipe operatorsdefmulti/defmethod) creates virtual-dispatch relationship edgesContext
Complements existing Java/Kotlin/Scala support. Clojure runs on the JVM and frequently interops with Java libraries. ClojureScript shares dependencies with JavaScript/TypeScript projects.