Skip to content
Brady Trainor edited this page Aug 1, 2021 · 10 revisions

Using Steve Purcell’s reformatter

Found at https://github.com/purcell/emacs-reformatter.

(reformatter-define dart-format
  :program "dart"
  :args '("format"))

(with-eval-after-load "dart-mode"
  (define-key dart-mode-map (kbd "C-c C-o") 'dart-format-buffer))

;; (with-eval-after-load "dart-mode"
;;   (bind-key "C-c C-o" 'dart-format-buffer dart-mode-map))