Closed CarwynNelson closed 6 years ago
Just a little bit of an update. This appears to be happening when parsing is underway, ie at the bottom, the following message is shown in vim:
[Log] Parsing file:///home/user/code/location/to/file.php
When a project is fully parsed this does not seem to be an issue. I'm still waiting for the current project I'm having this issue with to parse - which could take a while considering how large it is.
I will update when I have more information.
Update: It looks like my previous assumption was correct. If the project is parsing files (or I imagine any high load) the d
key (and other keys) only require one press to do an action that would typically require more than one.
This looks similar to issue #460 in deoplete (which I am not using). Maybe this same, or a similar fix would work?
Yes, I think it is the same problem.
This looks similar to issue #460 in deoplete (which I am not using). Maybe this same, or a similar fix would work?
It is the timer feature problem. If the timer is fired, the mapping will be canceled.
Is this something that can be easily resolved?
I have searched LanguageClient-neovim, but I cannot find the timer.
It is the real minimal vimrc?
call plug#begin('~/.config/nvim/plugins')
Plug 'autozimu/LanguageClient-neovim', { 'do': 'UpdateRemotePlugins' }
Plug 'roxma/LanguageServer-php-neovim', { 'do': 'composer install && composer run-script parse-stubs' }
call plug#end()
autocmd FileType php LanguageClientStart
I think you have installed other auto completion plugin.
My normal vimrc includes roxma/nvim-completion-manager
, but I removed my plugins folder and ran UpdateRemotePlugins
to clear everything out before writing the above vimrc so that I could narrow down the issue.
EDIT: I'm assuming that this is the correct way to clear out all plugins?
I think nvim-completion-manager works. You should set runtimepath manually without the plugin manager.
I'm not sure I follow? Is the issue not in the LanguageClient-neovim plugin?
Happy to close if it is not.
I think it is not LanguageClient-neovim problem. Please check.
Hi @Shougo
I should probably mention that my experience with neovim is limited and I'm not that great at vim either. I switched from a fairly basic vim setup to emacs with evil mode a while back and now I'm looking to get back to vim with neovim.
When you say set runtimepath
I'm not entirely sure what you are referring to. I understand from reading the help file that this just tells vim where to look for config files - but I'm not sure I understand how this helps me debug the problem?
I've deleted my old config, added the one above, deleted my plugins folder and ran :set runtimepath
which outputs this:
runtimepath=~/.config/nvim,~/.config/nvim/plugins/LanguageClient-neovim/,~/.config/nvim/plugins/Langua
geServer-php-neovim/,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/flatpak/exports/share/nvim/si
te,/var/lib/flatpak/exports/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/share/n
vim/runtime,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,/var/lib/flatpak/exports/share/n
vim/site/after,~/.local/share/flatpak/exports/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/
xdg/nvim/after,~/.config/nvim/after
the nvim-completion-manager
plugin does not appear to be on the runtimepath
and yet the issue still persists. Am I missing something there? Or doing something wrong?
@Shougo I'm having the same issue and I am using deoplete. Any information I can provide to help out here?
Actually, ignore me for now. I am having issues isolating the problem with a minimal .vimrc
. I'll update this issue if I am able to find a minimal .vimrc
I can reproduce with.
EDIT: I'm assuming that this is the correct way to clear out all plugins?
It is the correct way to try minimal vimrc.
This project does not use timer. Not sure what happened in your situation.
Could you reproduce the issue with a public available repo?
Actually, ignore me for now. I am having issues isolating the problem with a minimal .vimrc. I'll update this issue if I am able to find a minimal .vimrc I can reproduce with.
Please provide the reproduce ways.
I've just tried this on a different machine (macbook pro) which has never had neovim on it before. Same vimrc and the bug persists.
As an example of loading in a large project I am using microsoft/tolerant-php-parser
.
EDIT: Could this possibly be a bug in vim?
That's not a valid min vimrc.
When I start neovim with the provided vimrc, got "No language server found for php", which is a valid error message for the given vimrc.
Please verify.
Hi @autozimu
Do you have to run :PlugInstall
- or have Plug
installed?
Yes, I do have it installed.
roxma/LanguageServer-php-neovim will register the php language server at some point at startup. And when opening a file with nvim -u min-vimrc src/Node.php
, because of autocmd FileType php LanguageClientStart
, neovim will try start LanguageClient, but at this point, the php language server hasn't been registered by roxma/LanguageServer-php-neovim yet. That's why I'm saying the provided vimrc is not a valid one to reproduce the issue.
Please make sure you are using the real min vimrc to reproduce the issue, not your original vimrc, either by replace your vimrc file with min vimrc, or with command nvim -u min-vimrc src/Node.php
.
Actually please ignore my previous comment. I made a mistake when running with the min vimrc.
I got a blocking issue when trying to reproduce the issue,
10:37:25 DEBUG [RPC-php ] <= Warning: Unterminated comment starting line 2 in /Users/lijunfen/.local/share/nvim/plugged/LanguageServer-php-neovim/vendor/microsoft/tolerant-php-parser/src/PhpTokenizer.php on
After seeing this message at initialization, the php language server stopped responding. Might because of latest changes.
I might have some observations that might (or might not) be relevant to the issue.
d
. It's mostly anything that is multi-keypress sequence (cw
, d%
…). It sometimes „presses“ the first key again, changing it into things like cc
and then writing w
.I can reproduce it quite often, this is how:
cw
and see a w being written instead of a word disappearing. When I wait for clangd to process everything (and drop to 0% CPU), it starts working as it should again.Thanks for the info, @vorner . I will try with it to see if I can get more insight.
@vorner Could you provide the project link if it is open source?
I tried a few c++ projects. clangd either works instantaneously or never respond.
Unfortunately no, it is company code. However, I suspect it might be caused by the catch
unit testing framework included in the source code.
If this still doesn't help, I'll try to create a fake language server that simulates the long response times.
OK, I tried to create a fake language server that helps me to reproduce the problem quite reliably: https://github.com/vorner/sls. It is in rust, so building with cargo install
or similar should work.
I then configured the language server for text
file type, opened x.txt
and typed fast for a while. Then hit
The sls thing just produces a publishDiagnostics notification after a short while for each didChange and responds with small dummy completion result. The requests are blocking ‒ if you type fast, you create a backlog and the answers come as they get served.
Great, thanks a lot for your effort!
I will see what I can do.
Another observation. If I don't load deoplete, I can't reproduce. So it seems to be somewhere inside the integration with deoplete, maybe…
I actually tried with the language server, but still cannot reproduce this issue.
Could you try a different completion framework, like https://github.com/roxma/nvim-completion-manager?
I've already migrated to NCM because I don't get the problem with it. The thing is, I don't get the problems with deoplete without the language client, it's just the two together.
I upgraded to neovim 0.2.1 and I can no longer reproduce it either.
Thanks for the update.
I’m actually using 0.2.1 long before the official release. That’s probably the reason why I never seen this issue.
On Mon, Nov 13, 2017 at 12:56 vorner notifications@github.com wrote:
I upgraded to neovim 0.2.1 and I can no longer reproduce it either.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/autozimu/LanguageClient-neovim/issues/132#issuecomment-344055198, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYt72qCGiRNstYxk-czdCJHjPH7rfOLks5s2K0GgaJpZM4PcPi0 .
It's an issue with Neovim's timers that have since been fixed in newer versions. I raised an identical issue on a different plugin a few months back
If the issue was fixed in neovim 0.2.1
then I am more than happy to close this issue.
Is it worth maybe adding this to the documentation under something like Common Issues
or Troubleshooting
?
Sounds good.
On Fri, Dec 8, 2017 at 01:32 Carwyn Nelson notifications@github.com wrote:
If the issue was fixed in neovim 0.2.1 then I am more than happy to close this issue.
Is it worth maybe adding this to the documentation under something like Common Issues or Troubleshooting?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/autozimu/LanguageClient-neovim/issues/132#issuecomment-350217220, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYt73XM5DGFy8UEOwyLEvzynEeWZ9_Rks5s-QIcgaJpZM4PcPi0 .
Using the PHP language server from Roxma when the language server is enabled
LanguageClientStart
a single press of thed
key delets a line.Expected functionality is that a single press of the
d
key would not delete a line, instead, a double press would.Neovim version
Plugin Version
Minimal vimrc
Check Health
rplugin.vim I do not have an rplugin.vim.
LangaugeClient log Does not seem to contain anything except for logs of files being parsed.