inf-ruby
inf-ruby copied to clipboard
pry syntax highlighting/color
Using pry from inf-ruby looks like this:
Using pry from iTerm2 looks like this:
Is there a way to get pry's syntax highlighting from within inf-ruby?
Here's what my inf-ruby configuration looks like:
(require 'inf-ruby)
(setq inf-ruby-default-implementation "pry")
(add-hook 'inf-ruby-mode-hook
(function
(lambda ()
(setq show-trailing-whitespace nil)
(linum-mode 0))))
Here's my ~/.pryrc
:
Pry.config.correct_indent = false if ENV['INSIDE_EMACS']
Thanks for your help!
Over here, I do have the return values highlighted. But IIUC you're asking about the input text.
That sounds difficult, because comint-mode
doesn't replace the input lines with their echoes from the external process. Not sure how that could work in practice, with different kinds of REPLs.
Could we do something like.. Turn on the echo in the REPL and colorize the echo?
On Wed, Sep 28, 2016 at 7:08 PM Dmitry Gutov [email protected] wrote:
Over here, I do have the return values highlighted. But IIUC you're asking about the input text.
That sounds difficult, because comint-mode doesn't replace the input lines with their echoes from the external process. Not sure how that could work in practice, with different kinds of REPLs.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nonsequitur/inf-ruby/issues/88#issuecomment-250327495, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEJSZWkrspDO9BANSfiGH1MBDQ-g1o8ks5quvNPgaJpZM4KJZgI .
It might be possible, and it would need to happen in comint.el
. If you're interested, please give it a try.
@dgutov That's strange that you're getting return values highlighted and I'm not.
I'm getting the same result too when I replace my .emacs with this minimal one:
(setq package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")))
(require 'package)
(setq package-enable-at-startup nil)
(package-initialize)
(package-refresh-contents)
(defvar my-packages '(inf-ruby exec-path-from-shell))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
(require 'inf-ruby)
(setq inf-ruby-default-implementation "pry")
(add-hook 'inf-ruby-mode-hook
(function
(lambda ()
(setq show-trailing-whitespace nil)
(linum-mode 0))))
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
Here's what I see:
Any ideas what could be going wrong on my end? I'm using emacs 24.5.1 from https://emacsformacosx.com
I'm not sure why, but my Pry.color
was false
when running pry within inf-ruby. I added Pry.color = true
to my ~/.pryrc and now I get colorized return values.
Ah yup, I have that in my .pryrc
as well.