Giter VIP home page Giter VIP logo

gorepl-mode's Introduction

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

gorepl-mode's People

Contributors

manutestin avatar stardiviner avatar syohex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gorepl-mode's Issues

Echo commands sent to gore

Your mode rocks. It makes using gore easy and fun. This is my first time using and totally changes learning Go. Now, I can't figure something out:

On my box the comint-send-string commands are not echoed. So it is confusing to issue a command and see the results without knowing what command was run. I wonder if I need to set comint-process-echoes to true, but I didn't figure out where to do that yet. Are the commands echoed for you?

I tried one of these and that didn't work for me either:
(add-hook 'gorepl-mode-hook (lambda () (setq-local comint-process-echoes t)))

I am probably doing something wrong.

How do I make command sent to gore echoed?

Interpret '<TAB>' input as tab-completion

Hey @manute ๐Ÿ‘‹

Thanks for this great package!
I really like gore's tab completion ability - but it's not present in gorepl-mode.
Would it be possible to get it to interpret tab key presses as they are in a terminal emulator?
i.e: tab-completion, rather than inputing a \t

Update key bindings

I added a bunch of functions and a Hydra.

I will add those to the readme.

gorepl-mode will be enable in new opened files/buffers too

Enable /gorepl-mode/ will be enabled in all after opened new buffers.

For example, when I enable gorepl-mode in go-mode buffer, with config:

(add-hook 'go-mode-hook #'gorepl-mode)

Then gorepl-mode will enabled in other new opened files, buffers too, weird.

I checked find-file-hook, and find-file-hooks, no gorepl-mode in those hooks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.