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

Support source jumping in ClojureScript code bases #263

Closed patrickboe closed 8 years ago

patrickboe commented 8 years ago

In response to 'info' messages over nREPL, A REPL consisting of ClojureScript Rhino REPL + Piggieback + CIDER nREPL provides file paths as urls (beginning with the 'file:' protocol preamble). Fireplace has been expecting file paths to be system paths, so attempts to execute [ and similar commands would fail.

See https://github.com/patrickboe/wheel/tree/46df77c1b6d25872b1ac621ba501c6428bc40c80 for an example project affected by this issue. Enter lein repl on the command line, then edit src/main/cljs/wheel/core.cljs in vim. An attempt to call :Djump wf/myadd will fail without this patch.

This commit adds support for paths expressed as urls, thus making file jumping possible for projects such as this.

tpope commented 8 years ago

Can you make s:dir_delim a function, so that it doesn't get out of date? My preferred name is s:slash().

patrickboe commented 8 years ago

sure, done - see https://github.com/patrickboe/wheel/tree/844e0cd28ad1891caa6e67b5ae1d893d8d8d5e27 for a repaired project.clj on the original example.

patrickboe commented 8 years ago

oh, darn it, i must have failed to save the change where i renamed dir_delim to slash. do you want me to just redo this in a new pull request, or submit another commit to this one?

tpope commented 8 years ago

I want a single commit.

patrickboe commented 8 years ago

okay, i've squashed the three commits together on my feature branch, with an update to the commit message noting the proper SHA for reproducing the original issue..

patrickboe commented 8 years ago

amended to rebase onto latest upstream commits