Skip to content

purcell/emacs-dune-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Melpa Status Melpa Stable Status Build Status Support me

dune-format.el

This Emacs library provides commands and a minor mode for easily reformatting dune files using dune's built-in format command.

Installation

If you choose not to use one of the convenient packages in MELPA, you'll need to add the directory containing dune-format.el to your load-path, and then (require 'dune-format).

Usage

Call dune-format, dune-format-buffer or dune-format-region as convenient.

Enable dune-format-on-save-mode in dune-mode buffers like this:

(add-hook 'dune-mode-hook 'dune-format-on-save-mode)

or locally to your project with a form in your .dir-locals.el like this:

((dune-mode
   (mode . dune-format-on-save)))

You might like to bind dune-format or dune-format-buffer to a key, e.g. with:

(define-key dune-mode-map (kbd "C-c C-f") 'dune-format)

💝 Support this project and my other Open Source work

💼 LinkedIn profile

✍ sanityinc.com

🐦 @sanityinc

About

Reformat dune files from within Emacs

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published