Skip to content

Highlight stacked discard macros #17

Description

@axvr

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededhighlightingAffects syntax highlighting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions