syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.62k stars 4.89k forks source link

Apply smartparens configuration to REPLs #762

Closed nwolfe closed 9 years ago

nwolfe commented 9 years ago

I'm wondering if we should extend the dotspacemacs-smartparens-strict-mode to cover REPLs as well. After all, I'm still programming when I'm in the REPL, right? Maybe there's an additional setting that would toggle this REPL coverage on/off - not sure.

I'm specifically interested in the Clojure REPL, but I figured this might be generally useful.

Thoughts?

syl20bnr commented 9 years ago

This is a good idea. This is something to add to the conventions since I guess it must be enabled for each REPL major mode explicitly.

nwolfe commented 9 years ago

This is something to add to the conventions since I guess it must be enabled for each REPL major mode explicitly.

Yeah, each package with a REPL would have to implement this support explicitly, if that's what you're alluding to with making this a convention.

I've got a simple one-liner to support this in the Clojure layer. I'll file it as a PR and we can go from there.

nwolfe commented 9 years ago

I'll file it as a PR and we can go from there.

See #768

person808 commented 9 years ago

Couldn't you just check if a major-mode is derived from comint-mode to check if a buffer is a repl? Thats how its done for buffer switching. This should work for most of them except for cider.