Fork me on GitHub

I've updated nvim-parinfer.js to use the new javascript lib. It's significantly faster (and has very little code) now, nice job @shaunlebron


I didn’t know you could use a js lib like that from cljs. I guess that’s what the new module-type option in foreign-libs is for


I was actually going to release a new version some time tonight, with a cljs wrapper to publish on clojars


I wonder if you still need externs


Yeah, it was actually pretty painful as I was trying the cljsjs version, and the wrapper etc and getting nowhere. Lots of interacting systems and it was hard to know what was causing my problems.


@snoe I wonder what problems you were getting


First, it took me awhile to figure out the :module-type and that cljsjs wasn't/didn't have the capability to set it. Basically, I'd see parinfer on js/module.exports but using multiple js libs would overwrite it. This was exacerbated by things seemingly working fine with :optimizations :none but not working with :simple. So, I tried for to get the plugin working with :none however both cljs and neovim-host are replacing node's require(...) and I suspect neovim-host is doing something bad with sandboxing modules. I ended up dropping that line since I couldn't get to the root of the problem. I went on to writing my own :foreign-libs and I found the :module-type option. That seemed to get me further with :simple but closure was throwing an error about redefining a const but not when using :none. I remembered looking at the :closure-warnings map previously and on a whim tried to :const :off and it finally compiled. So... I think cljsjs could improve with support for :module-type, I think either node-host or cljs w/node has a bug in their patched require, and I think cljs or closure should have that warning turned off with optimized compiles (or be able to catch the error when it's caused by the UMD rewriting).


@snoe: have you brought any of this to the attention of #C0E66E1H7?


@snoe I'm gonna update soon.


My team is trying to convert me to Emacs


@snoe: I also ran into the “cannot redefine const” error in closure, and posted it to the mailing list last week


It has to do with UMD style not recognizing that module.export can be defined inside an IIFE


@snoe, also parinfer-cljs (the cljs wrapper of parinfer.js I’m trying put out), I’ve confirmed it doesn’t work on Node


you were probably trying that


it’s interesting because requiring the cljsjs/parinfer library in cljs has different behavior depending on the environment


it seems useless in a Node environment, because I need to use require, but I don’t know how to “node require" a file that was prepended to the compiled output of the source that I’m inside of


on my todo list to try out Proton with Parinfer


hmm, that’d be neat, hadn’t heard of that


#C0GCNE3B3 is Atom-based spacemacs with parinfer and repl


looks like it is shaping up quite quickly


Right on.


oh, I didn’t know it was integrated, neat!