Pest mode provides a major mode for editing Pest files. It also contains a few advanced features.
Current stable version: 0.1.
Pest-mode features:
pesta
)pesta
)pesta
)pest-mode
, flymake-pest
, and flycheck-pest
are now on MELPA.
M-x package-install
both pest-mode
and flymake-pest
.pesta
(see below).To manually install pest-mode
, download the file and put it in your load-path
, and write in your config file:
(autoload 'pest-mode "pest-mode")
(add-to-list #'auto-mode-alist '("\\.pest\\'" . pest-mode))
If you use use-package
and quelpa
, life is easier:
(use-package pest-mode
:quelpa (pest-mode :fetcher github :repo "ksqsf/pest-mode")
:mode "\\.pest\\'"
:hook (pest-mode . flymake-mode))
To use the more advanced features, you must have pesta
installed.
pesta
is now on crates.io, so just do
cargo install pesta --force
Or, if you prefer the manual way,
cd pesta && cargo build --release
pesta
under target/release
, andPATH
.Note: you have to customize pest-pesta-executable
if pesta
is not
in your PATH
.
If you have added pest-mode
to auto-mode-alist
, then it should be enabled automatically on any .pest
file.
In a .pest
file,
pest-test-input
(default keybinding C-c C-t
): open a buffer to test the current grammarflymake-mode
: enable syntax checkingIn a testing buffer,
pest-select-rule
(default keybinding C-c C-r
): select the start rule for all other purposespest-analyze-input
(default keybinding C-c C-c
): analyze the input and report the structureflymake-mode
(enabled by default): enable syntax checkingeldoc-mode
(enabled by default): enable displaying the parse tree pathAll of the following require pesta
.