TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Parinfer: Simpler Lisp Editing

168 点作者 harperlee4 个月前

13 条评论

simongray4 个月前
I&#x27;ve been using Parinfer with IntelliJ (Cursive) ever since I started developing Clojure professionally back in 2018. The best thing about Parinfer, or at least the implementation in Cursive, is that it doesn&#x27;t preclude you from <i>also</i> mixing in some Paredit commands too.<p>When you start out with Clojure&#x2F;Lisp and you aren&#x27;t totally used to parenthesis you can just use Parinfer to get editor behaviour similar to developing Python. It removes a major pain point of migrating to a Lisp. It used to be the case that you were forced to learn Paredit pretty much from the start.
评论 #42769178 未加载
评论 #42770444 未加载
评论 #42770892 未加载
lemming4 个月前
I develop Cursive, an IDE for Clojure code, and I spent a long time integrating parinfer smart mode. It was actually really difficult to do well, I wrote a document with feedback about what (among other things I discovered later) that made it hard: <a href="https:&#x2F;&#x2F;github.com&#x2F;parinfer&#x2F;parinfer.js&#x2F;wiki&#x2F;Problems-integrating-parinfer-into-Cursive">https:&#x2F;&#x2F;github.com&#x2F;parinfer&#x2F;parinfer.js&#x2F;wiki&#x2F;Problems-integr...</a>. I subsequently fixed many of those issues, but it was probably the second hardest thing I&#x27;ve integrated into Cursive, after Leiningen.<p>It&#x27;s still a bit quirky, but I use it every day and I love it. Even though I&#x27;m proficient enough with paredit, parinfer is just so much easier to use. Several users have commented to me that the parinfer integration is the main thing stopping them switching away to a different editor - it really makes that much difference.
评论 #42790287 未加载
评论 #42778163 未加载
fnordsensei4 个月前
Parinfer was instrumental to me learning Clojure. Paredit felt like operating an airplane cockpit, and Parinfer took that experience and made it much closer to just writing prose, for which I am forever grateful.<p>I remember people, including Rich Hickey, scoffing at it when it came out, which seemed like kind of a snobbish reaction to something that lowers the barriers of entry.
评论 #42771902 未加载
评论 #42775447 未加载
phforms4 个月前
I’ve been considering Parinfer, but my issue was that it is a bit unpredictable where parens end up and I have to be careful to not mess up my code structure. Maybe I should give it another try for a longer time period.<p>My favourite structural editing tool for about a year now is symex[1], which is an Emacs package (and unfortunately not that well known compared to paredit, lispy, etc.). It takes some getting used to at first but after a while you only move around and think in terms of s-expressions, you don’t even see parentheses anymore. It really feels like you are a squirrel climbing trees (hence the image on the repo, I guess). I just hope the dev(s) will be able to get rid of the heavy dependencies on other packages soon.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;drym-org&#x2F;symex.el&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;drym-org&#x2F;symex.el&#x2F;</a>
评论 #42788879 未加载
Folcon4 个月前
I&#x27;ve used it for a number of years, but I do believe that while this is really helpful, it&#x27;s a little incomplete.<p>It has gaps around pasting content and how to handle that elegantly as well as comment behaviour, if those two things could be reconciled, it would be even more useful :)...
mkreis4 个月前
This is really nice, and I am impressed how much effort went into the documentation, to make the demo nice and interactive.<p>At first I thought this is something new, because it&#x27;s cool and I haven&#x27;t heard of it, even though I&#x27;m coding in Clojure for about 3 years now. But this project is already 10 years old and hasn&#x27;t received much attention for the last few years, which is a pity. I wish it was coming with Calva, my favorite Clojure tooling in VS Code.
评论 #42767954 未加载
评论 #42771727 未加载
评论 #42767884 未加载
knubie4 个月前
Going from parinfer to editing without parinfer is kind of like going from vim to an editor without vim bindings. In other languages I find myself instinctively moving or editing text around expecting the brackets to magically rearrange themselves, only to be disappointed when they don&#x27;t.
jordanrobinson4 个月前
After using Parinfer for a few years the editing experience felt less like typing and more like a cross between magic and the scene from Ghost in the Shell with the split hands. It&#x27;s a real shame they weren&#x27;t able to add it to Calva.
gpanders4 个月前
Chris Oakman ported the parinfer algorithm to Lua [1]. I used this to write a parinfer plugin for Neovim [2]. I use Fennel (a Lisp that compiles to Lua) for all of my Neovim config and so use parinfer everyday. It works exceptionally well (there are occasional hiccups, but no showstoppers).<p>Neither my plugin nor Chris&#x27; script have been updated in 2+ years. That&#x27;s because it just keeps working. I owe a lot to Shaun and Chris for their work (my plugin is just a little glue code for interacting with the editor, they did all of the hard work).<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;oakmac&#x2F;parinfer-lua">https:&#x2F;&#x2F;github.com&#x2F;oakmac&#x2F;parinfer-lua</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;gpanders&#x2F;nvim-parinfer&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;gpanders&#x2F;nvim-parinfer&#x2F;</a>
kazinator4 个月前
I&#x27;m using a parinfer plugin with Vim for writing TXR Lisp.<p>There are some issues, but it&#x27;s usable.<p>I hacked in a hotkey to toggle it on and off (Ctrl-Underline).<p>The parinfer code from Vim does not work in the parens-&gt;indent direction, only indent-&gt;parens. I tried to get it working, but it didn&#x27;t for me.<p>It doesn&#x27;t properly understand the #; syntax for commenting out an object. It&#x27;s possible for it to get into an endless loop when an undo operation restores invalid syntax; there is a kind of fight between undo and parinfer that has to be interrupted by Ctrl-C.<p>Otherwise it&#x27;s mostly fine.
j13n4 个月前
I love innovation in this space, and remember when Parinfer came out having some enlightening discussions with colleagues about how they efficiently edited code.<p>I&#x27;ve since settled on Lispy and Lispyville in Emacs, and have run into very few issues over the past few years.<p>There&#x27;s something about Lispy’s style of editing that appeals to me — the use of hugging parentheses to enable its bindings, combined with Lispyville making all of my Vim bindings safe, makes me very happy.
zelcon4 个月前
I try to use paredit-mode, but it never seems to integrate well with evil&#x2F;vim keybindings. I always end up disabling paredit-mode after a few hours. I&#x27;ll give this a spin.
ralphc4 个月前
Is there a way to slow down the animation, including editing anything in the web source? I&#x27;m having a little trouble following it.