willghatch / emacs-on-parens

smartparens wrapper to fit with evil-normal-state
10 stars 2 forks source link

Feature: support show-smartparens-mode #2

Closed PythonNut closed 8 years ago

PythonNut commented 8 years ago

show-smartparens-mode has all sorts of problems in evil-normal-state. Since this package is aimed at fixing various smartparens functions in evil, fixing this would be cool as well.

willghatch commented 8 years ago

Hmm, so I know it will highligh parens both when I'm on them and when I'm on a space after them. Are there any other problems you think I should try to fix?

PythonNut commented 8 years ago

I'm not aware of any other problems, but I haven't tested it rigorously.

willghatch commented 8 years ago

On Mon, Nov 02, 2015 at 09:23:08AM -0800, PythonNut wrote:

It also highlights the wrong pairs when adjacent pairs are present e.g. (())̲ (underscore represents the point).

Also, it causes strange random jumping of the cursor. I'm not sure why, but you can reproduce by entering (()) and ling your way across starting at the beginning.

I can't reproduce either of these. What major mode are you doing this in? There might be another package or configuration that you are using that is causing weird behavior.

PythonNut commented 8 years ago

There might be another package or configuration that you are using that is causing weird behavior.

Yup, there was. That's why I deleted it. Sorry.

Bit of confusion since show-paren-mode is a global mode, but show-smartparens-mode is a non-global mode.

willghatch commented 8 years ago

Oh, sorry. I was using email instead of the github interface for comments, so I hadn't noticed that.

willghatch commented 8 years ago

Well, if it's just that show-smartparens-mode will highlight a pair if point is after one of the parens, I find it only a minor nuisance. A brief look at smartparens tells me that I'll have to use advice to make this work differently, which I would rather not do. Maybe just open a feature request with the smartparens package to add a configuration variable to make it only highlight a pair if one of the parens is the character after point rather than also allowing the one before.

PythonNut commented 8 years ago

Sure. I can do the advice myself, I suppose.

Thanks!