Fork me on GitHub
#spacemacs
<
2024-02-15
>
dumrat06:02:55

One slight annoyance: I'm in a rich comment block and I want to slurp the random-uuid call. cursor indicated by |

(comment

  (str |)(random-uuid)

  ,,,)
So, SPC k s and it becomes this:
(comment

  (str (random-uuid)))
Still fine, I can eval ok and everything but is there a way to disable this?

azimpel09:02:58

I always put an "\n" at the end of the comment form like this: (comment (str "hello") "there" \n )

πŸ‘ 1
Zeniten09:02:27

I'm doing a same using #_f. I'd like to config it away, if possible. πŸ™‚

πŸ‘ 1
practicalli-johnny10:02:08

I haven't found a rule to disable this behaviour. I tend to use #_() to stop the format bring up the closing comment paren. I have a rich-comment snippet in Practicalli Clojure LSP Config that creates the following code

(comment
 
 #_())

πŸ‘ 1
practicalli-johnny10:02:10

A very simple approach is to add a , (comma) before the closing paren of the comment expression, as commas are considered whitespace by the Clojure reader

practicalli-johnny11:02:34

Alternatively, I've found this less of an issue when using the parinfer approach rather than paredit. Although that is a bit of a cognitive change to writing code. I've only used parinfer with Neovim so far (works well though and I am less concerned with paren wrangling)

azimpel11:02:43

A simple comma is not working as it gets collapsed anyway.

dumrat05:02:38

I resorted to using the snippet and I think that's a good enough solution.

dumrat13:02:36

I realized I can get lost in emacs for hours fixated on how to automate some trivial thing πŸ˜„

☺️ 2
practicalli-johnny17:02:46

In my first year with Spacemacs I did spend quite a bit of time just submitting PRs to Spacemacs and extending my own user config. I dread to think how long it would have taken if I had tried doing this from scratch. I would certainly be using far fewer features, even nearly a decade later...

πŸ‘ 1
dumrat17:02:38

I went and had a look at some emacs/spacemacs use videos including one of yours. I think I'll gradually ease into it. For now, I am so happy with magit, magit todos, cider integration and portal. I have few kbds memorized but if I go crazy on spacemacs and your config I think I'll burn out. πŸ˜„

dumrat17:02:56

magit is the best git client I think I've used

πŸ‘ 1
practicalli-johnny19:02:44

Magic Forge is great too, if using GitHub for issues and PRs (which can be created & updated in Emacs)

πŸ™ 1