emacsorphanage / dart-mode

An Emacs mode for the Dart language
GNU General Public License v3.0
15 stars 2 forks source link

Formatting no longer works? #106

Closed GLodi closed 3 years ago

GLodi commented 5 years ago

I've set both dart and flutter SDKs in the path. They both show up in exec-path. I've recently noticed that formatting doesn't save anymore. Is it a bug?

bradyt commented 5 years ago

@GLodi, my apologies. I grew weary of maintaining all of this in one package. A note was added at https://github.com/bradyt/dart-mode/wiki/Recent-Changes. That half of the code has been moved to https://github.com/bradyt/dart-server. Once dart-server is installed and on load-path (IIUC, package.el updates load-path automatically), I think something like the following would bring back the formatter.

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

We might keep this issue open until we stop seeing issues for a time. For example, for visibility for other users. Or generally if people see related issues and they are brought up here or linked.

Another option is to use the last tagged version of dart-mode, and I can try to avoid pushing new tags until we see this issue subside. Therefore, melpa-stable will for some time have a version of dart-mode before the split.

bradyt commented 5 years ago

Another alternative is to use https://github.com/lassik/emacs-format-all-the-code. But I'm not sure how to get the same, "jump to issue" that dart-format has. That small issue is raised here: https://github.com/lassik/emacs-format-all-the-code/issues/50.

GLodi commented 5 years ago

Thanks for the heads-up. I should have checked the wiki before asking.

bradyt commented 5 years ago

Another alternative is Purcell's reformatter.el.

bradyt commented 3 years ago

I was leaving this issue because the changes were still recent enough. This is all from over a year ago, so I think it will be fine to close now. Let me know if you feel otherwise.