vim-classpath icon indicating copy to clipboard operation
vim-classpath copied to clipboard

Add offline mode (fallback to env)

Open tochev opened this issue 11 years ago • 5 comments

I tried to add an offline mode using -o (as suggested in https://github.com/tpope/vim-classpath/issues/6 ), however lein respected it only for the stuff from the maven repos while still downloading from clojars. Also maven's dependency plugin outputted a lot of error messages with -o. So I opted for defaulting to the fallback ($CLASSPATH).

Ideally this should be done in a more flexible way (e.g. falling back on cache, adding a command for updating the classpath, detecting when you are offline, etc.).

tochev avatar Mar 31 '14 22:03 tochev

$CLASSPATH only is pretty worthless, no?

tpope avatar Apr 02 '14 22:04 tpope

Unfortunately, pretty much so :( , unless the user is willing to set it "manually" when working on a project. I wanted a way to be able to safely open random projects and also remove the downloading overhead.

As I've said, initially I tried -o but it did not behave the way I was hoping for.

tochev avatar Apr 03 '14 06:04 tochev

I'm confused what you get out of this patch you wouldn't get out of just disabling classpath.vim entirely.

tpope avatar Apr 03 '14 10:04 tpope

If I remember and understood the code correctly, vim-classpath is needed by vim-fireplace when running without connection to REPL.

My apologies if I misunderstood and feel free to reject the pull request.

tochev avatar Apr 03 '14 11:04 tochev

Well it needs vim-classpath, but more importantly it needs the correct classpath it provides. If you feed it this default, it'll blow up for anything eval related at the very least. I guess :A and gf might work some of the time.

tpope avatar Apr 03 '14 11:04 tpope