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

Use cider info op for Find #241

Closed Deraen closed 8 years ago

Deraen commented 8 years ago

This adds gf support for Cljs

tpope commented 8 years ago

gf is go to file not jump to definition. Other than the alias edge case (which in hindsight was probably a mistake), it works statically, not requiring a repl connection at all. Best I can tell, you're greatly expanding the use of a repl connection to solve...what exactly?

Deraen commented 8 years ago

To add support for alias edge case in Cljs. I don't know how gf should be used but several people were mentioning on Clojurians Slack that gf is broken with Cljs. It throws an exception when used on path with alias because it's trying to call ns-aliases which doesn't exists on Cljs. This only changes the edge case, which already used repl, to use cider which works for both Clj and Cljs.

tpope commented 8 years ago

The file !~# '\.' check limits it to alias candidates only. You need to wrap that around the whole thing.

tpope commented 8 years ago

While I'm willing to accept a patch if that is addressed, the "broken" allegation is bollocks, as the behavior desired is not covered by the gf documentation. This is what ]<C-D> is for.

Deraen commented 8 years ago

Fixed as suggested.