Fork me on GitHub
#emacs
<
2020-05-27
>
AC01:05:44

smartparens is popular too

practicalli-john06:05:36

@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.

nmkip10:05:14

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)

dotemacs11:05:17

> 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.

nmkip11:05:33

> 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

practicalli-john14:05:19

When using Evil style editing, then using evil-cleverparens is recommended.

practicalli-john14:05:17

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)

practicalli-john14:05:36

@UJCC6CE9E set dotspacemacs-smartparens-strict-mode t

practicalli-john14:05:07

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

practicalli-john14:05:18

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

nmkip22:05:29

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 !!

👍 1
codeasone15:05:41

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

emacs 1
practicalli-john15:05:43

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.

Charles Fourdrignier16:05:29

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 ?

sogaiu19:05:14

it's not that the window is hiding behind something else right?

Charles Fourdrignier05:05:02

No. 🙂 But your suggestion make me test on my personal computer and it works (the window opens). So the problem is only on my work computer. They are both Mac, with Emacs + CIDER, but there is probably a different version. I will check this.

Charles Fourdrignier06:05:14

For information, after updating CIDER package on both computers, it works on both. Thank you for your suggestion.

🎉 1