webyrd / Barliman

Prototype smart text editor
MIT License
1.04k stars 30 forks source link

Add Parinfer to the text input #17

Open oakmac opened 7 years ago

oakmac commented 7 years ago

I saw the demo of Barliman at Clojure/Conj 2016 and thought it might be useful to add Parinfer to the text input on the left-hand side of the app. With Indent Mode running, a user would never have to worry about unbalanced parens.

Parinfer is currently implemented in several languages, although not in Swift or Objective-C. This may make the case for porting Parinfer to Swift, or perhaps a bridge could be set up to one of the existing languages.

gregr commented 7 years ago

Thanks, this is definitely a good suggestion. We used to support limited automatic paren balancing, but it was extremely buggy and often got in the way, so we disabled it. But as you probably noticed, manually managing parens and indentation, especially while doing a live demo, is a pretty harrowing experience. :)

We're not committed to Swift or OSX in general, so it may make more sense to port the Barliman UI to another platform that already supports Parinfer. We've talked about moving to a browser-based setup, possibly also using something like Electron.

Any suggestions are appreciated, especially on this front!