项目作者: deadtrickster

项目描述 :
Erlang-format command for erlang-mode. Based on anildigital/mix-format, powered by erlang/sourcer.
高级语言: Emacs Lisp
项目地址: git://github.com/deadtrickster/erlang-format.git
创建时间: 2018-03-02T11:09:18Z
项目社区:https://github.com/deadtrickster/erlang-format

开源协议:Other

下载


erlang-format

erlang-format command for erlang-mode. Based on https://github.com/anildigital/mix-format, powered by https://github.com/erlang/sourcer.

  1. (with-eval-after-load 'erlang-mode
  2. (bind-key [f12] (lambda ()
  3. (interactive)
  4. (delete-trailing-whitespace)
  5. (erlang-format))
  6. erlang-mode-map))
  7. (require 'erlang-format)
  8. (setq erlfmt-erlang-ls "~/bin/erlang_ls")
  9. (add-hook 'erlang-format-hook '(lambda ()
  10. (if (projectile-project-p)
  11. (let ((sourcer-config-filename (concat (projectile-project-root) "/.sourcer.config")))
  12. (when (file-exists-p sourcer-config-filename)
  13. (setq erlfmt-args (list "--config" sourcer-config-filename))))
  14. (setq erlfmt-args nil))))