3 ms·
Lisp also really benefits from an editor that colourizes ( ) in matching pairs. Even C benefits from colour-matching {} in my experience. I'm surprised it's n
by retrac 4y ago
Lisp also really benefits from an editor that colourizes ( ) in matching pairs. Even C benefits from colour-matching {} in my experience. I'm surprised it's not more common.
- azeirah 4y agoI believe Jetbrains IDEs do this by default for certain languages, I know HTML for sure. That, or I have a plugin running in the background for years without me noticing.
- deleted 4y ago[deleted]
- mtlmtlmtlmtl 4y agoI got used to Lisp before I knew rainbow-parens were a thing. Then I tried it and found it added nothing. I'm sure it would be helpful as a learning tool though. What I really can't recommend enough is paredit. It ensures balanced parens by always creating a close to an open. Typing a close just jumps you past the nearest close after the cursor. Along with the thing where the cursor momentarily jumps to the open paren when going past a close paren. When I need to add another expression to a scope, I just hit close paren until I see the jump to the relevant open paren then hit enter. I do know some older(than me) Lisp programmers who even find paredit excessive though. Eventually, I found that when reading lisp I almost never actually look at the parens at all, only the indentation.
- harperlee 4y agoI was surprised with the lukewarm reception parinfer (which ties indentation with parens, in an automated way, and is compatible with paredit actions) had on the lisp world. I found it invaluable, especially for newcomers. It completely takes out parens-as-a-risk out of the question, effectively turning lisps into formally indentation-based languages, a la python (which is to some extent how everybody reads lisp).
- mtlmtlmtlmtl 4y agoI haven't looked at parinfer, but in general, in the Lisp community parentheses aren't really viewed as a problem to be solved. It's just a quirk of the language that requires a a few simple methods to deal with, and then it becomes completely natural, even seen as elegant. With things like BARF/SLURP-SEXP, to move expressions in and out of their parentheses, KILL-SEXP to delete a sexp to the buffer, adding a numeric prefix to open paren to wrap n expressions in parentheses, and ofc NEXT/PREV-SEXP. The language becomes a joy to edit, because everything conforms to this syntax you can do pretty much everything you want with this small handful of commands(all provided by paredit). As I mentioned in another comment, there is essentially a grieving process as a newly enlightened lisper comes to terms with the fact that other languages haven't caught on to this clearly(to the lisper) perfect and superior notation. So probably parinfer is solving a problem that most Lisp programmers aren't looking to solve. That would be my guess anyway. All this is not to pass judgement on your for finding it helpful, and I certainly agree that having more tools for beginners to get used to editing S-expressions is helpful.
- harperlee 4y ago> So probably parinfer is solving a problem that most Lisp programmers aren't looking to solve. That would be my guess anyway. It mainly helps adoption, so in a way you are right, it’s not a problem for current users… but it is a problem for industry (as much as I deplore the reality that such a superficial familiarity bump detracts so many people).
- filoeleven 4y agoThis was recently enabled for Javascript in VS Code, and was a welcome sight. (The Calva plugin for Clojure already had it, naturally.)
- hoseja 4y agoAnd there's been some nice blogs about the engineering challenge of doing that right.