ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.44k stars 2.81k forks source link

"Not allowed here" error with MacVim 8.1, both python 2 and 3 (OK with MacVim 8.0) #3052

Closed sillyfrog closed 6 years ago

sillyfrog commented 6 years ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Issue Details

Provide a clear description of the problem, including the following key questions:

Installed MacVim using home-brew, and also tried from the Release page on the macvim git page, both v8.1.x had this issue. Downgrading to v8.0 from the macvim site resolved the issue (however I would like to run the latest from home-brew, and this will likely affect others as well).

Freshly installed Mac (in the last 2 days), and another fairly clean Mac had the same issue.

Installed Vundle, and the single additional thing installed is YouCompleteMe (ie: no other plugins). The install was run with just ./install.py (ie: no options, but I have also tried it with ./install.py --clang-completer with the same result.

Include steps to reproduce here.

Open a simple python file, eg test.py, containing:

import os
os.syste

Go to the end of the second line, wait for the autocomplete options, and press tab. You won't be able to enter insert mode again, and get the error "Now allowed here".

Include description of a minimal test case, including any actual code required to reproduce the issue.

I can enter insert mode again in the file.

Include description of the expected behavior.

Adding set completeopt-=preview to my .vimrc stops this issue from happening.

Include description of the observed behaviour, including actual output, screenshots, etc.

Diagnostic data

Output of vim --version

https://gist.github.com/sillyfrog/108cb1245966d2b45b65b3ce1846a2ec

Output of YcmDebugInfo

https://gist.github.com/sillyfrog/7571c937e145e8d2148939a211ceec89

Contents of YCM, ycmd and completion engine logfiles

YcmLogs: https://gist.github.com/sillyfrog/85ed00849d61d7f8c5331d7be4843e3b

Jedi server logs: https://gist.github.com/sillyfrog/6c5b12e2ea774b56cc7ab35b6549e6f9 stdout was empty.

Server logs: https://gist.github.com/sillyfrog/70d75ba9204ee9cee36459a5c16bbff9 https://gist.github.com/sillyfrog/e9aa3d094d162057ae4c95eaa00dc6e0

During my testing I noticed the connection errors, however using nc locally I was able to connect, and the autocompletion did sort of work. As mentioned above, it did also work fine with MacVim 8.0.

Server logs: https://gist.github.com/sillyfrog/ce8dc7c500f42b5665c0ce672999ca50

Add let g:ycm_log_level = 'debug' to vimrc, restart Vim, reproduce the issue, and include link here to a gist containing the entire logfiles for ycm, ycmd and any completer logfiles listed by :YcmToggleLogs.

OS version, distribution, etc.

ProductName: Mac OS X ProductVersion: 10.13.5 BuildVersion: 17F77

Output of build/install commands

https://gist.github.com/sillyfrog/32a04f327c25b2ad4fd712e3b3601445

micbou commented 6 years ago

This is caused by a Vim bug introduced in 8.1.0035 but fixed in 8.1.0042. You need to either downgrade Vim to a version older than 8.1.0035 or wait for Homebrew to release a new version.

sillyfrog commented 6 years ago

Thanks for the quick response - I'll wait it out. Cheers!