manage to get rid of heavy pyls in vim-lsp

vim-lsp and pyls

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

manage to get rid of heavy pyls in vim-lsp
How to get rid of server custom emoji in message.content
How to get rid of long comprehensions
Get rid of DICOM images in Python
How to get the number of digits in Python
Get rid of python's KeyError
How to get a list of built-in exceptions in python
How to get an overview of your data in Pandas
I want to get rid of import warnings from Pyright and pylint in VS Code
Get rid of slow scp -pr
How to get rid of the "Tags must be an array of hashes." Error in the qiita api
Try to get a list of breaking news threads in Python.
How to get the vertex coordinates of a feature in ArcPy
Python techniques for those who want to get rid of beginners
Create a function to get the contents of the database in Go
[Linux] Command to get a list of commands executed in the past
How to get a stacktrace in python
Manage python packages to install in containers
Use the Java SDK of GoogleMapsAPI to get the result of reverse GeoCoding in Japanese.
How to get a list of files in the same directory with python
How to keep track of work in Powershell
Summary of how to import files in Python 3
Get the caller of a function in Python
How to get results from id in Celery
[Python] Get rid of dating with regular expressions
Get pointers to struct members in Python ctypes
Getting rid of DICOM images in Python Part 2
I want to get League of Legends data ③
How to get dictionary type elements of Python 2.7
How to get the files in the [Python] folder
Get a glimpse of machine learning in Python
To get the path of the currently running python.exe
What to do to get google spreadsheet in python
I want to get League of Legends data ①
Use pygogo to get the log in json.
Method to get all keys of nested dict
Use os.getenv to get environment variables in Python
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)