emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
2021-05-09T20:02:53.216700Z

Hi folks. I’ve been working on vilpy [1], a fork of lispy [2], a vi-like paredit. In regards to Clojure, these are the main differences compared to the original lispy: - Do not inject Clojure code to cider. lispy does that for adding some niceties but it gets in the way depending on the project setup. - Do not rely on internal details from cider. For evaluation, just use cider-eval* functions. - Do not assume that cider is used at all. Supports inf-clojure. Furthermore, In general, vilpy is less featureful by design. I removed tons of obscure commands and language-specific functions. For more difference, please consult [3]. Feedback is welcome. [1]: https://github.com/Andre0991/vilpy [2]: https://github.com/abo-abo/lispy [3]: https://github.com/Andre0991/vilpy#lispy

grazfather 2021-05-09T20:12:25.217500Z

Why are you writing a fork? just curious what part of lispy bothered you enough to write your own

grazfather 2021-05-09T20:14:57.218500Z

(I see the section now)

grazfather 2021-05-09T20:15:12.218700Z

Have you seen lispyville?

2021-05-09T20:19:44.221900Z

I confess I didn’t understand lispyvilles README when I read it for the first time. It seemed pretty complicated. After working with vilpy, I think I would grok it today, but I was always fine using lispy commands in insert mode and vim commands in normal mode. (ironically, I’m experimenting with Emacs bindings today anyway.) But thanks for reminding me, I’ll add a section about lispyville in the README.

grazfather 2021-05-09T20:26:42.223600Z

for sure! I happen to hate the lispy minor mode, it’s madness. I use lispyville to basically bind some lispy functions when I am in evil-normal mode. I would be interested to trying yours out. To me navigating sexps, moving them, and slurp/barf are the most important

grazfather 2021-05-09T20:28:55.223800Z

fwiw:

; Lispyville needs Lispy, but I don't want to ever use the insane lispy-mode
; bindings.
(use-package! lispy)
(use-package! lispyville
  :hook ((lisp-mode . lispyville-mode)
         (emacs-lisp-mode . lispyville-mode)
         (ielm-mode . lispyville-mode)
         (scheme-mode . lispyville-mode)
         (racket-mode . lispyville-mode)
         (hy-mode . lispyville-mode)
         (lfe-mode . lispyville-mode)
         (dune-mode . lispyville-mode)
         (clojure-mode . lispyville-mode)
         (fennel-mode . lispyville-mode))
  :init
  (setq lispyville-key-theme
        '((operators normal)
          c-w c-u                       ; Ctrl-w and Ctrl-u are sexp aware
          (atom-movement t)
          slurp/barf-lispy              ; >/< to 'grow' and 'shrink' sexps
          additional                    ; M-j/k to swap atoms forward/back
          additional-insert))           ; M-{i,a,o,O} for sexp-aware enter insert
  :config (lispyville-set-key-theme))

2021-05-09T20:35:26.224300Z

Got it. In this case, I guess vilpy won’t help you much: its minor mode is identical to lispys. It’s just ‘vimmier’ in the sense that its keybindings are more vim-like. In my case, when using evil, I just got used to staying in insert mode for editing lisps. I tried to avoid normal mode as much as possible since lispy is generally enough (albeit not familiar or comfortable for one that expects vim). However, I’ll add in the README one could replicate lispyville with vilpy. That would require another package (say a vilpyville), but creating such package shouldn’t be too difficult: I guess it’s mostly a matter of replacing lispy with vilpy and possibly fixing some renamed functions. I don’t have the motivation for doing this right now, but I might try it someday.

2021-05-09T20:40:29.224500Z

Or, better yet, maybe simply aliasing vilpy functions to the lispy equivalents would make lispyville work already.

grazfather 2021-05-09T21:41:44.225300Z

Cool. Thank you for the explanation. We have a different philosophy here :)

👍 1