emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
lispyclouds 2020-03-01T12:33:05.070200Z

Any *Doom Emacs* users use any safe structural editing modes here? If yes, how do you configure it?

iammiles 2020-03-02T16:33:50.092300Z

I removed smartparens in favor of paredit. Works pretty well for me.

ag 2020-03-02T23:27:35.092700Z

> I removed smartparens in favor of paredit. Why though? you could just do M-x sp-use-paredit-bindings

iammiles 2020-03-03T00:17:26.092900Z

For the reason that was mentioned earlier: smartparens allows me to unbalance parens a little too easily. I find that paredit makes that a bit more difficult.

nmkip 2020-03-03T01:20:18.093100Z

Is there a package that prevents me from deleting parens in normal mode?

practicalli-john 2020-03-03T09:06:23.094700Z

@juan.ignacio848 smartparens in strict mode prevents deletion of parens where that would make them unbalanced. smartparens is included in Spacemacs (a simple config to set to strict mode). There seems to be an issue using smartparens in Doom for some people.

nmkip 2020-03-05T01:50:23.115Z

It seems to be working with evil-paredit in Doom

nmkip 2020-03-05T01:50:52.115200Z

I'm still deciding between Doom and Spacemacs (and cursive which is the one I usually use ๐Ÿ™‚ )

Cora (she/her) 2020-03-05T02:43:17.115400Z

doom's upgrade experience, fast startup, and responsive maintainer is why I use it over spacemacs

Cora (she/her) 2020-03-05T02:43:41.115600Z

spacemacs would break for me enough that I just stopped upgrading once I got a known working version

Nir Rubinstein 2020-03-01T12:41:53.070400Z

I use doom. As for safe editing, I use it. Iโ€™ts pretty much auto configured. I added in my config the following:

(add-hook! smartparens-mode
  (evil-cleverparens-mode)
  (evil-unimpaired-mode)
  (smartparnes-strict-mode))

Nir Rubinstein 2020-03-01T12:42:33.070600Z

Since smartparens is enabled by default (AFAIK) Keep in mind that Iโ€™m an emacs noob so this my be overkill/incorrect - YMMV

lispyclouds 2020-03-01T12:49:38.070900Z

would i need to install evil-cleverparens-mode for it?

lispyclouds 2020-03-01T12:50:12.071100Z

dont think that exists by default? I too am just starting out with Doom

Nir Rubinstein 2020-03-01T12:50:33.071300Z

Yup - just add it to packages.el in your doom directory

Nir Rubinstein 2020-03-01T12:51:25.071500Z

I also added unimpared - you can just delete it if you donโ€™t use it (itโ€™s from my vim days)

lispyclouds 2020-03-01T12:55:51.071900Z

I added (package! evil-cleverparens) in packages.el and

(add-hook! smartparens-mode
  (evil-cleverparens-mode)
  (smartparens-strict-mode))
in config.el but i can still delete the closing braces, what i am missing?

lispyclouds 2020-03-01T13:04:28.072100Z

what i want is the (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks) like behaviour. But cant find its source to copy too ๐Ÿ˜•

Cora (she/her) 2020-03-01T13:47:49.075Z

after changing packages.el you should run doom upgrade and restart emacs in order to get your new packages

lispyclouds 2020-03-01T13:52:10.075200Z

yeah i did that

lispyclouds 2020-03-01T13:52:54.075400Z

I should not be able to delete closing parens, braces right?

Cora (she/her) 2020-03-01T14:27:09.077600Z

do SPC h m and check if the mode is activated. and you can delete closing braces you just can't unbalance them using bulk delete commands like dd

lispyclouds 2020-03-01T15:12:50.078600Z

ah, the mode is activated. the spacemacs one doesnt let me delete the closing ones in addition to this too. was hoping i can get that behavior here too

Cora (she/her) 2020-03-01T15:39:21.079600Z

might be worth looking at what spacemacs uses for settings to get that

Nir Rubinstein 2020-03-01T16:01:33.079800Z

For me, deleting occurs, but it deletes both the opening AND the closing parens - thus keeping my s-expression balanced

lispyclouds 2020-03-01T18:40:33.082500Z

@nirrub does it work for example in (def a (+ 1 2)) and I delete the ) after 2? The one before + is deleted too? Or only if the sexp is empty? The first case is not possible in spacemacs.

lispyclouds 2020-03-01T18:41:30.083500Z

@corasaurus-hex that was my intent too. But failing to find where that could be defined

Cora (she/her) 2020-03-01T18:42:41.083700Z

there's also lispy in doom, and there's evil-smartparens out there as well. you can explore to see what works how you want

lispyclouds 2020-03-01T18:46:27.086500Z

Or I guess I will reset my head and muscles and just follow doom ๐Ÿ˜„ really liking its snappy speeds and lean features, specially compared to spacemacs. Thanks for the pointers @corasaurus-hex

Cora (she/her) 2020-03-01T18:50:11.087Z

no prob, glad to help!

practicalli-john 2020-03-01T20:10:00.087200Z

Sounds like smart-parens is not in strict mode, if you can delete parens and leave them unbalanced.

romain 2020-03-01T20:15:47.088400Z

After modifying config files you have to do doom refresh :)

lispyclouds 2020-03-01T20:26:06.088600Z

@romain yes i did that pretty much after every change ๐Ÿ™‚

1
lispyclouds 2020-03-01T20:27:00.088900Z

@jr0cket where can i find the impl of (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks) ?

lispyclouds 2020-03-01T20:29:40.089100Z

@romain still I'm able to delete the closing braces and leave it unbalanced. These are all the changes I made in config.el:

(add-hook! smartparens-mode
  (smartparens-global-strict-mode))
it says the strict mode is on and also I cannot _add a ) back after i have unbalanced it. it says cannot do that in strict mode ๐Ÿ˜•

lispyclouds 2020-03-01T20:31:08.089400Z

practicalli-john 2020-03-01T20:35:41.089800Z

I believe that toggle code is generated by other code, so no explicit code to copy.

lispyclouds 2020-03-01T20:38:28.090Z

ah okay

practicalli-john 2020-03-01T20:41:16.090200Z

Are you deleting close parens in Evil insert mode or Evil normal mode

lispyclouds 2020-03-01T20:43:30.090400Z

in insert mode

practicalli-john 2020-03-01T20:49:57.090600Z

Very strange then. Unless something is broken with the package, then it sounds like something is conflicting with something else in doom or another package. I am just guessing now (not a doom user)

lispyclouds 2020-03-01T20:54:58.090800Z

yeah im beginning to think so too. I have asked this on their discord channel now. fingers crossed! Thanks for the help @jr0cket

romain 2020-03-01T22:20:42.092Z

Maybe Try to reach henrik on doomโ€™s discord?

1