sogaiu / ajrepl

A mode for interacting with a Janet REPL
6 stars 1 forks source link
editor-plugin emacs janet repl

ajrepl

A mode for interacting with a Janet REPL

Setup

How to set things up varies a bit depending on how one manages one's Emacs, e.g. straight.el, Doom, etc. What's common to all situations is likely:

straight.el

Doom

Vanilla

package.el

Usage

  1. Open a Janet file

  2. Start an interactive REPL for Janet by M-x ajrepl.

    A buffer for a Janet repl should appear.

  3. Various forms of sending things to the REPL should be possible, e.g.

    • Send buffer (C-c C-b)
    • Send expression at point (C-x C-e)
    • Send expression upscoped (C-c C-u) - see below for details
    • Send region (C-c C-r)

    If Emacs' menus are enabled, there should be a Ajrepl menu which shows the above (and other) commands.

Misc Notes

ajrepl-send-expression-upscoped can be handy when evaluating forms such as (import ...) which might otherwise lead to output one might not be interested in.

Experimental Commands

There's also a file named ajrepl-experiment.el that contains some experimental (aka "may not stick around") functionality.

If the file is required, it should add some additional things to the Ajrepl menu.

Issues