tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

:Connect not working with lein-droid nrepl #175

Closed antonvesnin closed 10 years ago

antonvesnin commented 10 years ago

Doue to some android deployment limitations there is no /clojure/tools/nrepl/version.txt file, so nrepl server not sending any version. Look: http://dev.clojure.org/jira/browse/NREPL-54

But fireplace want to check it and fails on Connect with key not exist error.

So, may be there is need to check for version presense before trying to access minor and major keys. I don't know a lot about viml, for myself temporary i did just like this:


if len(client.describe.versions.nrepl) > 0

     if client.describe.versions.nrepl.major == 0 &&

          \ client.describe.versions.nrepl.minor < 2

    throw 'nREPL: 0.2.0 or higher required'

     endif

  endif

I'm sure you can come with some better idea. Thaks for great plugin.