Add JediClearCache command

This can be used to work around issues like
https://github.com/davidhalter/jedi/issues/784.
This commit is contained in:
Daniel Hahler
2016-10-06 19:12:21 +02:00
parent 9384d464ec
commit 12db7ad364
2 changed files with 8 additions and 0 deletions

View File

@@ -266,6 +266,13 @@ function! jedi#py_import_completions(argl, cmdl, pos)
PythonJedi jedi_vim.py_import_completions()
endfun
function! jedi#clear_cache(bang)
PythonJedi jedi_vim.jedi.cache.clear_time_caches(True)
if a:bang
PythonJedi jedi_vim.jedi.parser.utils.ParserPickling.clear_cache()
endif
endfunction
" ------------------------------------------------------------------------
" show_documentation

View File

@@ -31,5 +31,6 @@ endif
command! -nargs=1 -complete=custom,jedi#py_import_completions Pyimport :call jedi#py_import(<q-args>)
command! -nargs=0 JediDebugInfo call jedi#debug_info()
command! -nargs=0 -bang JediClearCache call jedi#clear_cache(<bang>0)
" vim: set et ts=4: