Closed Jeiwan closed 8 years ago
Removing the if
statement @Jeiwan referenced worked for me. I was able to exit the REPL and then open a new REPL without needing to manually reconnect to the REPL in VIM. If no REPL is available then the code is not formatted.
This is my first attempt at vimscript so it is always possible I've inadvertently done something horrible. :)
To reproduce:
The plugin fails on this line https://github.com/venantius/vim-cljfmt/blob/master/plugin/cljfmt.vim#L53 with a message saying that
cljfmt.core
namespace is not found. And this is true, since after restarting REPL we have to re-require the namespace. And this check https://github.com/venantius/vim-cljfmt/blob/master/plugin/cljfmt.vim#L66 is wrong. I guess there should be a call tofireplace#session_eval
with(find-ns 'cljfmt.core)
and a check that it returns non-nil. Or maybe something better. (I'm a Vim-script noob and failed to make a working fix)