Skip to content

Evil lisp commands add indentation in Haskell mode #2547

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

Closed
rpglover64 opened this issue Aug 5, 2015 · 4 comments
Closed

Evil lisp commands add indentation in Haskell mode #2547

rpglover64 opened this issue Aug 5, 2015 · 4 comments

Comments

@rpglover64
Copy link
Contributor

In haskell-mode, running any evil lisp command, either by key binding or by name (e.g. SPC k w) will cause the current line to be indented one additional space.

@syl20bnr
Copy link
Owner

syl20bnr commented Aug 5, 2015

evil lisp commands may have different behaviors in non-lisps, to achieve SPC k w I suggest using SPC v s ), repeat v until you get the whole thing you want to wrap.
( will insert spaces between the parens.

@rpglover64
Copy link
Contributor Author

Yes, that works for wrapping, but e.g. SPC k r (evil-lisp-state-sp-raise-sexp) doesn't have a nice vim equivalent. Also, the note at the end of this section of the spacemacs documentation suggests that the evil lisp state keybindings are intended to be useful in editing things that aren't only lisp.

This might be an issue with smartparens; it looks like calling sp-raise-sexp directly has the same buggy behavior.

@syl20bnr
Copy link
Owner

syl20bnr commented Aug 5, 2015

The only smartparens functions trying to work in other languages are behind SPC k ``, these functions are called hybrid. There is no raise` available unfortunately it would require some kind of awareness of the underlying AST.

@rpglover64
Copy link
Contributor Author

But raise does exactly what I want, except that it also inserts exactly 1 space every time it is called.

Also, reading the smartparens documentation on its hybrid commands, that's not the impression I got; specifically, I got the impression that the hybrid commands are for manipulating "hybrid sexp"s, which are distinct from "sexp"s in a way that makes them more useful in non-lisp languages, but that if you wanted to manipulate "sexp"s, you could do so just fine using the standard commands.

Finally, calling the hybrid commands results in the same incorrect behavior.

This looks like it's a bug in haskell-mode, so I've filed it there: haskell/haskell-mode/issues/796.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants