Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

rustfmt.el - OBSOLETE

MELPA

This package has been merged into rust-mode. Please use that instead.

Format rust code in emacs using rustfmt.

Install

Ensure you are using MELPA:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

Then install the "rustfmt" package:

  • M-x package-list-packages
  • Find the "rustfmt" and install with I

Usage

Run M-x rustfmt-format-buffer to format the current buffer.

For convenience, you may bind it to a key, such as:

(define-key rust-mode-map (kbd "C-c C-f") #'rustfmt-format-buffer)

Alternatively, run rustfmt before saving rust buffers:

(add-hook 'rust-mode-hook #'rustfmt-enable-on-save)

About

Format rust code in emacs using rustfmt

Resources

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •  
You can’t perform that action at this time.