Closed nacknime-official closed 4 years ago
Just to clarify, VScode does not use palantir's python language server, but rather a custom implementation on top of jedi. I've also noticed slow completions from pyls when using vim-lsp/LanguageClient-neovim. You should try using mspyls (the Microsoft Python Language Server), which I added to nvim-lsp, and is much faster.
Just to clarify, VScode does not use palantir's python language server, but rather a custom implementation on top of jedi. I've also noticed slow completions from pyls when using vim-lsp/LanguageClient-neovim. You should try using mspyls (the Microsoft Python Language Server), which I added to nvim-lsp, and is much faster.
I haven't say that I compared with VSCode, I compared with coc.nvim, these things are different.
What about pyls_ms - that's laggy, buggy and eats too much CPU since open a python file.
I haven't say that I compared with VSCode, I compared with coc.nvim, these things are different.
coc-python is a fork of VSCode's python plugin.
What about pyls_ms - that's laggy, buggy and eats too much CPU since open a python file.
pyls_ms is the same language server that coc-python uses when you disable jedi in coc-settings.json. It's significantly faster in my experience for most projects.
I haven't say that I compared with VSCode, I compared with coc.nvim, these things are different.
coc-python is a fork of VSCode's python plugin.
What about pyls_ms - that's laggy, buggy and eats too much CPU since open a python file.
pyls_ms is the same language server that coc-python uses when you disable jedi in coc-settings.json. It's significantly faster in my experience for most projects.
yes, it's faster, but we're talking about pyls now. On my screencasts you can see that jedi in coc.nvim (I didn't disable jedi in the coc config file) is much faster than in nvim-lsp
You can't compare the speed of pyls in nvim-lsp, to the speed of pyls in coc-python, because coc-python does not use pyls. Pyls is the speed bottleneck, not the nvim lsp implementation. To confirm, you can try LanguageClient-neovim and vimls, they will both have the same delay.
What you're really asking for is a feature request, to make a new language server using the jedi implementation of vscode (which coc-python forked/wraps), and then to provide support for that in nvim-lsp. Microsoft isn't really developing that anymore in favor of the new C# based mspyls, which we already deliver.
@nacknime-official as mentioned by @mjlbach, coc-python doesn't use pyls, it uses jedi directly. If you want to compare the speed, you can configure coc.nvim to use pyls by uninstalling coc-python and following these instructions: https://github.com/neoclide/coc.nvim/wiki/Language-servers#python (spoiler alert: it'll be as slow, because pyls is the problem here).
This should be an issue in python-language-server's issue tracker.
Oh, I'm so sorry, I thought coc-python uses pyls. Thanks for you all, I'm closing this issue.
If nvim-lsp supports https://github.com/pappasam/jedi-language-server, it may solve the problem instead.
Oh interesting, sent #284.
nvim --version
:Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/share/nvim"Run :checkhealth for more info
health#nvim_lsp#check
Checking language server protocol configuration
health#nvim#check
Configuration
Performance
Remote Plugins
terminal
health#provider#check
Clipboard (optional)
Python 2 provider (optional)
import neovim
. Using the first available executable for diagnostics.Python 3 provider (optional)
Python virtualenv
Ruby provider (optional)
ruby
andgem
must be in $PATH.ruby
andgem
commands work.Node.js provider (optional)
Perl provider (optional)
perl
andcpanm
must be in $PATH.perl
andcpanm
commands work.pyls
Archlinux + Sway (walyand)
kitty 0.17.4
$TERM
:xterm-256color
How to reproduce the problem from neovim startup
With the minimal nvim config
I press
<C-x><C-o>
to call the completion menu afterawait message.
to getmessage's
methods (not only in aiogram, different modules needs to wait different time)Actual behaviour
Suggestions shows very slow comparing with Coc.nvim + Coc-python, Jedi is enabled Nvim-lsp Coc.nvim + Coc-python
Expected behaviour
Faster responce like in coc.nvim + coc-python
I don't know this issue of nvim-lsp or pyls, but coc.nvim works through jedi or pyls and works faster than nvim-lsp, correct me if I'm wrong