oakmac/atom-parinfer

Activate Parinfer for grammars, not file extensions

J-qak opened this issue · 3 comments

J-qak commented

There is an option in package.json to activate plugin on certain grammars, the entry is called activationHooks and should be used as f.e. "activationHooks": ["language-clojure:grammar-used", "language-lisp:grammar-used"]. It would feel more native to atom than looking for file extension, since one can write to an unsaved buffer with lisp grammar enabled.

👍 I think it is a good idea to support auto-enabling Parinfer on the community lisp grammars for Atom:

J-qak commented

Can't think of any more right now :-) However language-lisp package would need a little update, I found few bugs in this one, f.e. comment toggle, multiline comments (dispatch macro #| |#), CLOS macro names, etc.

I don't think this is a bad idea, but I think file extensions are simpler (both for the user and implementation). I don't want to support both file extensions and grammars and then have special rules for which one "wins" when they conflict, etc.

I'm not too worried about the unsaved buffer case. You can always turn on Parinfer with Ctrl+( manually.