Open kommen opened 4 months ago
Toplevel def
s with metadata is very common in Clerk notebooks.
e.g for controlling visibility: https://github.com/nextjournal/clerk/blob/cbb19fd8f1a9b3b01c9ccb0d43c6dbb4571f3829/notebooks/visibility.clj#L21-L22
or specifying viewers: https://github.com/nextjournal/clerk/blob/cbb19fd8f1a9b3b01c9ccb0d43c6dbb4571f3829/notebooks/viewer_api_meta.clj#L22-L23
I pushed a WIP branch trying to address this: #43
This is valid Clojure code and is handled correctly in
clojure-mode
:Expected behavior
To match the behavior of
clojure-mode
which is: -)b
can navigated to via imenu -)(def b 2)
properly font locked liked other toplevel defs -)(def b 2)
not indentedActual behavior
-)
b
not included in imenu -)(def b 2)
not font locked -)(def b 2)
indentedSteps to reproduce the problem
Put this a
clojure-ts-mode
buffer:Environment & Version information
clojure-ts-mode version
tree-sitter-clojure grammar version
v0.0.12
Emacs version
E.g. 29.3
Operating system
macOS 14.4