-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
lispy in spacemacs #122
Comments
If you need other commands, let me know. If they're useful I'd be happy to add/implement them.
The way I use Lispy, I don't find it lacking anywhere. Initially, I went through all of Paredit functionality to make sure that Lispy offers an equivalent of it. Smartparens doesn't do more than Paredit for LISP, as far as I know. I did have a look at Paxedit when it was just released, Lispy has the same functionality in a consistent way. I don't know to which refactor.el you refer. But I'm aware of clj-refactor. I've never used it seriously, but I've examined it and it's a completely different way of approaching things than Lispy. Instead of having very accessible basic commands from which you build your refactor dynamically, clj-refactor (and similar packages, I guess) gives a huge list of canned recipes, that apply only in specific situations and can't be composed. The way I see it, in a perfect situation the canned recipe is always faster (just once shortcut to do everything), but it takes effort to remember all recipes and recognize which one to use. On the other hand, with lispy you incrementally transform your code by composing familiar commands that you use over and over: sometimes it's more key strokes, but it works in all situations. Still, there's no issue in using at once two orthogonal packages like lispy and clj-refactor: in each case you can take the clj-refactor shortcut if you recognize and remember it, or use lispy instead. |
I started writing the spacemacs lispy layer with the initial thought that it would take a bit of work integrating it with evil. The more time I spent using lispy, the fewer changes I found I needed to make against the stock configuration. I use lispy together with clj-refactor in basically the way that abo-abo describes - lispy is how I do 95% of my work, and I'll dip into the clj-refactor commands directly when it's convenient. There are maybe 2 or 3 keybindings that need to be tweaked in order to get lispy up with spacemacs - you want to be able to access the evil-leader key prefix (M-m in emacs mode), the evil-leader-mode-prefix (C-M-m) and maybe the evil-jumper forward and back commands (TAB and C-o) depending on how often you use them. On extending lispy commands, I had asked a similar question here #111 and abo-abo's answer was exactly what I was looking for. Since a few people have mentioned it in the last couple of days, I'll go ahead and make a new lispy layer for getting started using it in spacemacs. |
Thank's a lot now I have the confidence to learn lispy thoroughly and to rely on it in the future. |
As an enthusiastic Emacs newbie and seasoned Vim user who's eager to get into sexp-level editing with sensible keymappings, I'm very much looking forward to your lispy spacemacs layer, cmccloud! |
Great to see Lispy integrated with Spacemacs/Evil. I see @cmccloud is also a commiter to https://github.com/luxbock/evil-cleverparens, how are the projects related? |
Fantastic :D |
@abo-abo Shortcuts are meant to be mnemonic. Also, with Spacemacs you can discover them easily. In the case of clj-refactor in the Clojure layer I don't need to remember the function I'm trying to perform. If I'm trying to do an extraction, then I go into the (e)xtract menu which gives me options for the task I'm trying to perform. |
I am thinking about moving from prelude config to spacemacs.
Is there anything I should be aware of using lispy with the clojure-layer in spacemacs?
Some notes regarding the context of my question:
I am very impressed by how far lispy got to consolidate commands for structural editing lisps.
Still I and some other people on github too (I searched the notes in sources of config files) ask themselves how to consolidate paredit, smartparens, paxedit, refactor.el and lispy (kind of once and for all ... ).
https://github.com/search?utf8=%E2%9C%93&q=paxedit+vs+lispy&type=Code&ref=searchresults
refactor.el seems to cover some structural editing operations too, making lispy less relevant for clojure development?
The question actually seems to be how to extend lispy with other commands if needed.
Until now I hope that the evil keybinding system will help me to integrate lispy with other related commands into one seamless interface and workflow.
Is this a real need or does it just seem to be a need from beginners perspective?
Here are some entry points on this topic:
syl20bnr/spacemacs#2792
https://github.com/search?q=evil+lispy&ref=opensearch
The text was updated successfully, but these errors were encountered: