clojure-emacs/clojure-mode

Support clojure-dart

jgoday opened this issue · 3 comments

Support clojure-dart source files.

Currently, clojure-dart files are basically clojure source files that compiles to dart.
See:

Expected behavior

Clojure-mode should support clojure-dart files (.cljd).

Actual behavior

Current clojure-mode does not detect .cljd files.

Steps to reproduce the problem

Environment & Version information

clojure-mode version

clojure-mode (version 5.14.0)

Emacs version

28.0.91

Operating system

MacOS 12.0.1

Are there any syntax differences between Clojure and ClojureDart?

Are there any syntax differences between Clojure and ClojureDart?

As pointed here: https://github.com/Tensegritics/ClojureDart/blob/main/doc/differences.md
there are some minor/very subtle differences (taken directly from clojureDart documentation)

  • Exceptions: Try/catch with additional stacktrace alongside with the exception
(try
  ...
  (catch io/HttpException e ; no stack trace binding
    ...)
  (catch Exception e st ; stack trace binding
    ...))
  • Member names as strings
(. a "[]=" i v)
  • Dart literals
#dart [1 2 3] ; a growable List<dynamic>
#dart ^:fixed [1 2 3] ; a fixed List<dynamic>
#dart ^int [1 2 3] ; a growable List<int>
#dart ^:fixed ^int [1 2 3] ; a fixed List<int>
  • Reify with extends
(reify
  :extends material/StatelesWidget
  (build [_ ctx] ...))
vemv commented

Released as clojure-mode 5.15.0, which will be available within a couple hours