8

Github GitHub - manute/gorepl-mode: A minor emacs mode for Go REPL

 3 years ago
source link: https://github.com/manute/gorepl-mode
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.

  • Autocompletion
  • go-mode in gorepl-mode

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK