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

Fully qualify vars used from Require and RunTests #285

Closed brandonbloom closed 7 years ago

brandonbloom commented 7 years ago

Fixes reloading in files with (:refer-clojure :exclude [require]) or a var named reload.

brandonbloom commented 7 years ago

Sorry, this doesn't quite work, but the problem is real. I'll see if I can figure out a real solution.

brandonbloom commented 7 years ago

OK, the first commit does fix :Require, but not :RunTests. I've managed to fix :RunTests by fully qualifying even more symbols. I could understand if you dislike this solution (it is a bit ugly), but it definitely works. Happy to do some work to get this fix upstreamed. Let me know.

A more general fix that would not require fully qualifying so many symbols is as follows: On connect, clojure.core/load-file a runtime library for fireplace. Then replace all the interpolated string evaled bits with individual qualified calls.