clojure-vim/clojure.vim

Highlight stacked discard macros

axvr opened this issue · 0 comments

axvr commented

Currently the syntax highlighting support for the discard reader macro (#_) is limited to a single form, however Clojure supports stacking them which comments out subsequent forms.

;; Correctly highlighted:
(defn foo [x]
  {:bar  (+ x 1)
   #_:biz #_(* x 2)})

;; Incorrectly highlighted:
(defn foo [x]
  {:bar (+ x 1)
   #_#_:biz (* x 2)})

It may not be possible to implement this behaviour, but is worth trying. If it isn't possible (to do efficiently) we may just disable the existing comment reader macro highlighting support by default for consistency.