hvesalai / emacs-sbt-mode

An emacs mode for interacting with scala sbt and projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colours or Completion: pick one

fommil opened this issue · comments

commented

This is a meta ticket to centralise discussions around colours, completion and jline.

TL;DR terminals that echo the user input break the completion. Jline either gives echo and ansi colours, or no echo and no ansi colours. So you need to pick one.

  • team completion (the default): (setq sbt:program-options '("-Djline.terminal=none"))
  • team colour: (setq sbt:program-options '("-Djline.terminal=auto"))

Further information in jline/jline3#235

The plan is to

  • fix it in jline2
  • fix it in jline3
  • lobby for an sbt 0.13 release with updated jline
  • lobby for an sbt 1.x release with updated jline

and somewhere along the way have instructions to use sbt/launcher#50 to use a locally build jline2 with the patch. Possibly we could bundle the .class with sbt-mode and add the relevant property to be picked up by a recent sbt launcher.

@hvesalai wrote:

Aaaand we have also sbt 1.1.5 with my JLine update. Which means with the changes 
I made to Scala 2.12.6 we now have full color AND completion support for emacs

Are we referring to tab completion at the sbt prompt or the console{,Quick} prompt within sbt (aka REPL)? Perhaps no such distinction need be made, but I am finding one works when the other doesn't.

I am a heavier user of the console{,Quick} completion (since tab completion in ensime-inf.el would require a serious effort).

I find the last workable combination to be sbt 0.13, scala 2.11, and sbt-mode 1.0.2.

I find various permutations of sbt 1.1.5, scala 2.12, and sbt-mode 2.0.0 to produce the undesired ansi codes, and completions to neither work at the sbt prompt nor the console{,Quick} prompt. In particular, coloring is default active in scala repl 2.12 (and they appear untranslated in emacs).

Can an official recommendation be offered about colours and completion? Thanks.

commented

oh this is fixed now with sbt 1.1.6, sbt-mode 2.0.0, and scala 2.12.6

Okay, I traced my issue to an errant sleep in the ensime-emacs code ensime/ensime-emacs#697. It may well be that sbt 1.1.5 works.