I switched Vim's Python input completion from jedi-vim to vim-lsp, but it's slow. What's more, after a while of editing a Python file, automatic downloads of .py files on OneDrive that have nothing to do with the file you're editing occur frequently.
Looking at the process, pylint was running in a sub-process of pyls.exe with the CPU fully open and eating memory foolishly. It seems that this guy touches .py files in various places. What are you doing ...
Apparently, the pyls plugin pylint starts automatically and behaves unintentionally. I wonder what this is the default. (Is it because of my settings / environment?)
It seems that the plugin can be disabled by setting enabled
(enable d </ font> instead of enable), so leave only the completion jedi and stop it. I made it.
I think I can use it with this.
.vimrc
if executable('pyls')
call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': { server_info -> ['pyls'] },
\ 'whitelist': ['python'],
\ 'workspace_config': {'pyls': {'plugins': {
\ 'mccabe' : { 'enabled': v:false },
\ 'preload' : { 'enabled': v:false },
\ 'pycodestyle' : { 'enabled': v:false },
\ 'pydocstyle' : { 'enabled': v:false },
\ 'pyflakes' : { 'enabled': v:false },
\ 'pylint' : { 'enabled': v:false },
\ 'rope_completion' : { 'enabled': v:false },
\ 'yapf' : { 'enabled': v:false },
\
\ 'jedi' : {'extra_paths' : [] },
\ 'jedi_completion' : { 'enabled': v:true, 'include_params': v:true },
\ 'jedi_definition' : { 'enabled': v:true, 'follow_imports': v:true, 'follow_builtin_imports': v:true },
\ 'jedi_hover' : { 'enabled': v:true },
\ 'jedi_references' : { 'enabled': v:true },
\ 'jedi_signature_help' : { 'enabled': v:true },
\ 'jedi_symbols' : { 'enabled': v:true },
\ }}},
\ })
autocmd FileType python setlocal omnifunc=lsp#complete
endif
As an aside, vim-lsp also complements jedi.
Recommended Posts