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

I want to help to get lispy into spacemacs. What should I work on? #6050

Closed
mikavilpas opened this issue May 14, 2016 · 14 comments
Closed

I want to help to get lispy into spacemacs. What should I work on? #6050

mikavilpas opened this issue May 14, 2016 · 14 comments
Labels
- Mailling list - New Layer stale marked as a stale issue/pr (usually by a bot)

Comments

@mikavilpas
Copy link

Hey guys, I'd like to put in work that would enable spacemacs users to use lispy. I see there has been some work already on this:

But it seems to me that both those efforts have stalled for the time being.

I've worked on the evil-lispy package, which provides an opinionated way of using evil with lispy. It aims for simplicity for evil users - see the readme for more.
I have a private layer set up for it in my own config, but I don't think it's ready for inclusion in spacemacs yet.


For this purpose I'd like to open a discussion. Please tell me what you think about this, and what I should work on.
I think spacemacs and lispy are great, and would love to see them work together in an idiomatic way 👍

@nixmaniack
Copy link
Contributor

Just my 2 cents.

I am already using lispy with spacemacs while using hybrid style. As an active user of both spacemacs and lispy, I would just like to have lispy as is in hybrid state without any modifications except having M-m on something else.

You should go through the discussion of the first thread you pointed as in the end syl20bnr had expressed what he's expecting to include with lispy.

@mikavilpas
Copy link
Author

mikavilpas commented May 14, 2016 via email

@sooheon
Copy link

sooheon commented May 17, 2016

I would just like to have lispy as is in hybrid state without any modifications except having M-m on something else.

This is how I use it currently as well, along with lispyville. I don't think lispy really needs a layer that much, it works pretty much as you'd expect, going into special in insert mode and staying out in normal mode. Probably the most important config should be done by end user (personal keybinds, etc.)

@randre03
Copy link

@sp3ctum I'm curious how this is going? I am an evil user that wants to use lispy in spacemacs and am not interested in having to temp. switch to hybrid style to do so. About your private layer you mentioned, do you use that with the stock clojure layer as well? Thanks

@sooheon
Copy link

sooheon commented Sep 28, 2016

I think this is an antipattern. You don't need another mode for lispy, just use insert (or hybrid), it doesn't matter. I've been doing it this way without any special customizations for a while now, it's far better than toggling using M-m k or whatever else. An insert command like I or A is usually all it takes to get into special, from where you can move around using all the lispy commands directly, and esc takes you to normal state, just like vanilla evil. 99% of the time after I/i/A/a I'm immediately in special state, the other 1% of the time, I do have to press C-M-f or C-M-b once.

@mikavilpas
Copy link
Author

@randre03 Unfortunately I haven't worked on this since my last messages. I kind of settled on using my own layer, and am wondering, much like @sooheon, whether spacemacs users would find this a useful addition or not. It probably doesn't handle all use cases (only evil mode), and I think it's likely that it doesn't provide a lot of extra value for many.

However, I do use it personally all the time (for me it's nice at least). I use it with emacs lisp and with clojure, and both work very well.

Any thoughts?

@sondr3
Copy link

sondr3 commented Sep 30, 2016

Do you guys have your private layer/dotfiles anywhere so I can look around for how you configured it? I'm almost considering ripping out the Scheme layer and replace it with my own version using Lispy.

@mikavilpas
Copy link
Author

Yeah, mine is in the same repo as the private layer, see the original post.

@sondr3
Copy link

sondr3 commented Sep 30, 2016

Ah, completely overlooked that, thanks.

@Somelauw
Copy link

Somelauw commented Feb 25, 2017

Maybe lispyville can be added to spacemacs. It's a plugin similar to evil-cleverparens, but backed by lispy. Including it in spacemacs, should also make lispy itself available.

@lane-s
Copy link

lane-s commented Aug 9, 2018

Based on the old lispy layer thread, it looks like we need the lispy layer to, by default, act like a replacement for evil-lisp-state. I think the layer that @sp3ctum created works great, but I understand wanting have consistency with the SPC k sexp editing functions. Sometime soon I will try to see if I can make a layer that replaces evil-lisp-state with evil-lispy state and has appropriate key bindings in the SPC k menu. I would also want to add a configuration variable that just makes SPC k enter evil-lispy-mode.

I was not able to get lispyville working in spacemacs, so I'm leaning towards using evil-lispy-mode.

@Somelauw
Copy link

Somelauw commented Aug 9, 2018 via email

@lane-s
Copy link

lane-s commented Aug 10, 2018

@Somelauw could you elaborate further on what you mean by 'using it in insert state or in a lispyville way'?

The evil-lispy-mode package from @sp3ctum already has an evil-lispy-state, which basically toggles on lispy bindings. You have to press escape to get out of it, just like evil-lisp-state.

As far as I know, the only reason that his layer wouldn't be added to spacemacs right now is that it does not replace the SPC k bindings with sensible alternatives. Instead, it adds a minor mode (evil-lispy-mode) where there are a few keys you can press to do some movement and then enter a lispy editing mode until you press escape.

edit: I would probably also rebind some lispy commands and maybe change some of the functionality to be more vim-like. I need to get some more practice using lispy and writing lisp in general, but there were a few things that felt wrong to me as an evil user.

Off the top of my head:

  • C-k for kill seems like it could just as easily be d
  • Would probably rebind special-lispy-different to s for 'switch'.
  • Currently w and s move a sexp/selected region up or down. This is confusing to me since you have two axis (j-k and s-w) that both mean up/down. It would make sense to me as maybe C [ for up and C ] for down.
  • To make a new sexp on a new line you have to do C-j (, which I think would make sense as just o
  • deleting an atom should also delete either a trailing or leading space if there is one
  • rebind copy to y
  • bind newline + yank to p, rebind yank to P and C-p. The rationale here is that you may want to paste in insert mode, in which case you need a modifier key

I'm also put off by the way that editing atoms works in lispy. I think I would prefer if selecting an atom gave me the option to switch the point from one end of the atom to the other but also use evil commands such as cw or cfx. There could also be lispy specific targets like in lispyville, so you could do things like ca 'change atom' or da 'delete atom'. After making the edit, escape would take me back to lispy state with the atom selected.

I think some kind of lispy state could be an excellent replacement for evil-lisp-state, it just needs more work to make it more intuitive for evil users.

@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
- Mailling list - New Layer stale marked as a stale issue/pr (usually by a bot)
Projects
Mailing list
  
New packages or layers
Development

No branches or pull requests

9 participants