diff --git a/rustic-rustfmt.el b/rustic-rustfmt.el index 4a8af7c..faee596 100644 --- a/rustic-rustfmt.el +++ b/rustic-rustfmt.el @@ -464,6 +464,15 @@ Otherwise turn off rustic format functionality and run `save-some-buffers'." (advice-add 'save-some-buffers :around #'rustic-save-some-buffers-advice) +(defun rustic-generate-project-rustfmt-toml () + "Generate a default `rustfmt.toml' file in the project root." + (let* ((root (rustic-buffer-crate t)) + (file (expand-file-name "rustfmt.toml" root))) + (unless (file-exists-p file) + (with-temp-file file + (insert "edition = \"2015\"\n") + )))) + ;;; _ (provide 'rustic-rustfmt) ;;; rustic-rustfmt.el ends here