Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the Evil-Cleverparens layer breaks evil-surround #5666

Closed
gilch opened this issue Apr 4, 2016 · 6 comments
Closed

the Evil-Cleverparens layer breaks evil-surround #5666

gilch opened this issue Apr 4, 2016 · 6 comments
Labels
- Bug tracker - Should report upstream stale marked as a stale issue/pr (usually by a bot)

Comments

@gilch
Copy link
Contributor

gilch commented Apr 4, 2016

Description

Can't use evil-surround when evil-cleverparens is active.

Reproduction guide

  • Start Emac?h
  • SPC f e d add evil-cleverparens to dotspacemacs-configuration-layers
  • activate in a major mode e.g.
  (spacemacs/toggle-evil-cleverparens-on)
  (add-hook 'clojure-mode-hook #'evil-cleverparens-mode)

in dotspacemacs/user-config.
Reload spacemacs and try using surround in that mode.

@syl20bnr
Copy link
Owner

syl20bnr commented Apr 4, 2016

Not sure 100% but flagging it should report upstream: https://github.com/luxbock/evil-cleverparens

cc @luxbock

@gilch
Copy link
Contributor Author

gilch commented Apr 4, 2016

Cleverparens works by overriding certain Vim commands to better respect parentheses. Spacemacs moved the default surround key, so I'm not certain an upstream fix will be enough.

We need surround's version for those keys, so we might need a way to load evil-cleverparens first and evil-surround second, or have the cleverparens layer put just those keybindings back to Spacemacs' default (i.e. surround) after it loads the package.

The cleverparens layer documentation didn't explain very well how to set it up, see #5569.

The best alternative to cleverparens is parinfer, but that isn't working right either, and doesn't even have a layer yet, see #5574.

@syl20bnr
Copy link
Owner

syl20bnr commented Apr 5, 2016

Cleverparens works by overriding certain Vim commands to better respect parentheses. Spacemacs moved the default surround key, so I'm not certain an upstream fix will be enough.

Changing the key bindings should not prevent an evil-surround integration in cleverparens from working in Spacemacs.

@idrozd
Copy link
Contributor

idrozd commented Jun 7, 2016

Also breaks evil-snipe, even when snipe if enlisted after in dotspacemacs-configuration-layers

Putting evil-cleverparens first in the list, like @gilch suggested, however, fixed evil-surround, at least.

@luxbock
Copy link

luxbock commented Jun 8, 2016

Here is how I enable the evil-surround operations with evil-cleverparens:

https://github.com/luxbock/evil-cleverparens/blob/2e5f87be259b47ef37b91a5582f0d008ba6ce508/evil-cleverparens.el#L2114-L2118

I think this needs to happen once evil-surround has already been loaded.

If anyone can propose a fix that gets around it I'm happy to fix it upstream.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Bug tracker - Should report upstream stale marked as a stale issue/pr (usually by a bot)
Projects
Upstream bugs
To be reported
Development

No branches or pull requests

4 participants