smartparens is popular too
@laheadle smartparens is what I recommend. It works with multiple programming languages and provides a wide range of structural editing commands. It's especially recommended if you want to control the structural editing of your code. I found lispy too confusing with its automatic parens editing.
Maybe I'm missing some smartparens
config but if I have the following sexp and delete to end of line d $
it results in an unbalanced expression:
(a b | c d e) -> (a b
that problem dissappeared when I added evil-cleverparens
:
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode)
But some keybindings like >>
<<
H
L
were overriden by evil-cleverparens
π I had to:
(setq evil-cleverparens-use-additional-movement-keys nil)
in order to get H
and L
back.
Do you use smartparens
and evil-cleverparens
? Or just one?
What do you usually do when you want to do something like:
(a b (c d |e f g) h i j) -> (a b (c d) h i j)
> if I have the following sexp and delete to end of lineΒ d $Β it results in an unbalanced expression:
(a b | c d e) -> (a b
It must be down to your config. As this scenario should not occur.> It must be down to your config. As this scenario should not occur. Maybe I'm missing config, as it's almost the default spacemacs config: clojure layer and (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode) If you have some spare time, you can check my config here: https://github.com/juan-ignacio-848/dotfiles/blob/master/spacemacs.el
When using Evil style editing, then using evil-cleverparens is recommended.
I use D
to delete to the end of the expression, this will change (a b (c d |e f g) h i j) -> (a b (c d) h i j)
@juan.ignacio848 set dotspacemacs-smartparens-strict-mode t
You have redundancy in the evil-cleverparens config, you are setting it for all modes (line 587) and for clojure specifically (line 591). You can drop the clojure specific config as its covered by the former one https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html
If you are using Spacemacs develop
branch (and I hope you are), then these lines are not required https://github.com/juan-ignacio-848/dotfiles/blob/master/spacemacs.el#L608-L615 You already have clj-kondo included in the clojure layer on line 57
Yes, I'm using develop
branch. π
I removed the redundancy in the evil-cleverparens config, with D
this works (a b (c d |e f g) h i j) -> (a b (c d) h i j)
, this is because of evil-cleverparens right?
Done, it's working as expected !!
thanks
You are definitely not the only one. Lispy is very popular. For a very different take, you can check out parinfer.
I'm using paxedit
along-side smartparens
at the moment, it's a nice complement that's not often mentioned https://github.com/promethial/paxedit - mostly use this for paxedit-transpose-{forward,backward}
which works great within lets
and maps
If you know vim editing style, then using Evil actually does a lot of things I would otherwise need a structural editing or refactoring package to do.
It's probably a stupid question, but I would like to understand the why behind this. When I launch my REPL from Emacs with CIDER (via clj), clojure.inspector can't open windows. It doesn't crash, returns a Swing object but I can't see the window. Could someone share some knowledge about this ?
it's not that the window is hiding behind something else right?
For information, after updating CIDER package on both computers, it works on both. Thank you for your suggestion.