Skip to content

manute/gorepl-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

MELPA

gorepl-mode

A minor emacs mode for Go REPL.

Synopsis

gorepl-mode is a Go REPL interaction library for Emacs. It's built on top of gore.

Gorepl packs some features (in no particular order):

  • Powerful REPL - thanks to gore
  • Interactive code evaluation
  • Evaluate expressions selected
  • Launch a repl with loaded file in a context

Installation

gorepl-mode is available on MELPA

You can install gorepl-mode with the following command:

M-x package-install [RET] gorepl-mode [RET]

Prerequisite

Install gore.

Basic configuration

  • Enable gorepl-mode in go-mode buffers:
(add-hook 'go-mode-hook #'gorepl-mode)

Keyboard shortcuts

  • M-x gorepl-run: Launch an instance of gore REPL client.

  • M-x gorepl-run-load-current-file: Launch an instance of gore REPL client with the current file loaded.

gorepl-mode

Keyboard shortcut Description
C-C C-g Launch an instance of gore REPL client
C-C C-l Launch an instance of gore REPL client - with the current file loaded
C-c C-e Evaluate the region selected
C-c C-r Evaluate the current line

Issues

The performance for gore is not very fast, in fact when a gorepl is running using gorepl-run-load-current-file it can be slow at first, especially with large files, because it's doing go run to all file.

TODO

  • Autocompletion
  • go-mode in gorepl-mode