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

Option to get classpath offline

Open kul opened this issue 11 years ago • 3 comments

In case a maven repository is down it is impossible to open buffer without killing. It could be helpful to provide an option to user to set offline mode and use lein -o classpath in the plugin, which is significantly faster in general too.

kul avatar Mar 10 '14 08:03 kul

Imho the default should be lein -o as i see more value of the plugin when a repl is already running then one time evaluation.

2 cents.

kul avatar Mar 10 '14 08:03 kul

As of the most recent commit, classpath.vim now remembers if it fails to retrieve the path and doesn't try again till project.clj changes. The way I see it, combining that with -o is basically a non-starter, because the first attempt is very likely to fail if you're not diligent about running a lein command immediately after editing project.clj.

tpope avatar Mar 10 '14 19:03 tpope

I'd accept a patch that passes -o to lein and maven if g:classpath_offline is set. I'd be more enthusiastic about a solution that defaults to -o but copes with the above problem more gracefully, such as by retrying without -o if the problem is indeed offline related.

tpope avatar Mar 10 '14 19:03 tpope