Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/purcell/emacs-dune-format
Reformat dune files from within Emacs
https://github.com/purcell/emacs-dune-format
Last synced: about 2 months ago
JSON representation
Reformat dune files from within Emacs
- Host: GitHub
- URL: https://github.com/purcell/emacs-dune-format
- Owner: purcell
- Created: 2021-04-11T23:38:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T07:21:55.000Z (3 months ago)
- Last Synced: 2024-11-07T08:25:30.237Z (3 months ago)
- Language: Emacs Lisp
- Size: 6.84 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
[![Melpa Status](http://melpa.org/packages/dune-format-badge.svg)](http://melpa.org/#/dune-format)
[![Melpa Stable Status](http://stable.melpa.org/packages/dune-format-badge.svg)](http://stable.melpa.org/#/dune-format)
[![Build Status](https://github.com/purcell/emacs-dune-format/actions/workflows/test.yml/badge.svg)](https://github.com/purcell/emacs-dune-format/actions/workflows/test.yml)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][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:
```el
(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:```el
((dune-mode
(mode . dune-format-on-save)))
```You might like to bind `dune-format` or `dune-format-buffer` to a key,
e.g. with:```el
(define-key dune-mode-map (kbd "C-c C-f") 'dune-format)
```[melpa]: http://melpa.org
[💝 Support this project and my other Open Source work](https://www.patreon.com/sanityinc)
[💼 LinkedIn profile](https://uk.linkedin.com/in/stevepurcell)
[✍ sanityinc.com](http://www.sanityinc.com/)