This is an emacs mode for the smart contract language Pact.
Install pact-mode
from MELPA or clone this repo and add it to your load-path
in your .emacs
or init.el
file, requiring pact-mode
. Additionally, this mode has Flycheck linting support.
(add-to-list 'load-path "~/[where you cloned it]/pact-mode/")
(require 'pact-mode)
You'll need a working Pact installation to use the inferior shell. Prebuilt binaries are here or you can build from source.
To enable flycheck-pact, you should add the following lines to your init.el
or .emacs
:
(require 'pact-mode)
(require 'flycheck-pact)
(add-hook 'pact-mode-hook 'flycheck-mode)
- Syntax highlighting
- Launch the pact interpreter from the 'Lisp' menu ("inferior lisp process") or with
C-c C-z
- Load current buffer into inferior REPL with
C-c C-l
. With prefix (C-u C-c C-l
) prompt for file to load. - Use
semantic
features under the Development menu, like "Navigate -> Find Tag Globally ..." which finds any tag in any buffer you've opened. - Linting via flycheck supported with the
flycheck-pact
package