mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 10:54:22 +08:00
Add JediClearCache command
This can be used to work around issues like https://github.com/davidhalter/jedi/issues/784.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user