Question

When I type an opening parenthesis, ENSIME automatically inserts a closing parenthesis. How do I disable this?

Was it helpful?

Solution

The completion in Emacs's scala-mode happens when you turn on scala-mode-feature-electric-mode (which is the "recommended" mode in the scala-mode documentation). If it's something that happens manually, look for the following lines in your emacs startup files and comment them out:

(add-hook 'scala-mode-hook
           '(lambda ()
          (scala-mode-feature-electric-mode)
              ))

OTHER TIPS

Although ENSIME does have some formatting options, it doesn't look like inserting parens is one of them. Are you sure it's not paredit? I've battled with it in the past. Here's some info about how it auto inserts parens. I can be disabled even if it's loaded to see if it is the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top