mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 19:24:36 +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()
|
PythonJedi jedi_vim.py_import_completions()
|
||||||
endfun
|
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
|
" 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=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 JediDebugInfo call jedi#debug_info()
|
||||||
|
command! -nargs=0 -bang JediClearCache call jedi#clear_cache(<bang>0)
|
||||||
|
|
||||||
" vim: set et ts=4:
|
" vim: set et ts=4:
|
||||||
|
|||||||
Reference in New Issue
Block a user