hvesalai / emacs-sbt-mode

An emacs mode for interacting with scala sbt and projects
GNU General Public License v3.0
126 stars 38 forks source link

Completions don't seem to work in SBT 2.4.9, possible fix included #163

Closed abgruszecki closed 2 years ago

abgruszecki commented 3 years ago

Completions hang indefinitely in SBT 1.4.9, possibly in other versions as well. It seems that the root cause it that the prompt is preceded with some color escape codes, so comint-redirect-results-list doesn't terminate. Setting the following fixes the problem for me:

(setq           sbt:prompt-regexp "^\\(\\[0J\\)*\\(\\(sbt:[^>]+\\)?\\|scala\\)>[ ]+")

(the missing Unicode character is the ANSI code for escape, 0x1B)

And obviously passing --no-colors as an option to SBT fixes the problem as well, but where's the fun in that?

hvesalai commented 3 years ago

Would you like to make a PR of that?

abgruszecki commented 3 years ago

Sure, I'll just ensure that I can reproduce the problem in a clean repo and then I'll open the PR.

hvesalai commented 2 years ago

Completions are fixed by latest commits