ycm-core / YouCompleteMe

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

The signatures popup's error #3781

Closed ErrEoE closed 4 years ago

ErrEoE commented 4 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:

Include steps to reproduce here.

  1. gvim -Nu d:\mini_vimrc.txt
  2. :edit test.cpp
  3. input printf("", and use <tab> select size_t

GIF

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

If you made changes to vimrc_ycm_minimal, pase them here:

set encoding=utf-8
let s:path = expand('~/.vim/bundle')

let s:dein_dir= expand('~/.vim/bundle/repos/github.com/Shougo/dein.vim')
let &runtimepath=s:dein_dir . ',' . &runtimepath

if dein#load_state(s:path)
    call dein#begin(s:path)
    call dein#add(s:dein_dir)

    call dein#add('ycm-core/YouCompleteMe',{
                \ 'merged': 0
                \})
    call dein#end()
    call dein#save_state()
endif

syntax on
filetype plugin indent on

let g:ycm_autoclose_preview_window_after_completion=0
let g:ycm_autoclose_preview_window_after_insertion=0
let g:ycm_add_preview_to_completeopt = 'popup'
let g:ycm_confirm_extra_conf = 0
let g:ycm_complete_in_comments=0
let g:ycm_log_level = 'error'
let g:ycm_collect_identifiers_from_comments_and_strings = 1

let g:ycm_seed_identifiers_with_syntax = 1

let g:ycm_auto_hover = ''

let g:ycm_use_clangd = 1
let g:ycm_clangd_args = ['--header-insertion=never', '--include-ineligible-results']
let g:ycm_clangd_uses_ycmd_caching = 0

Include description of the expected behaviour.

The ":messages" output.

Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
Traceback (most recent call last):
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "<string>", line 1, in <module>
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\youcompleteme.py", line 360, in ClearSignatureHelp
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
    self.UpdateSignatureHelp( {} )
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\youcompleteme.py", line 366, in UpdateSignatureHelp
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
    self._signature_help_state = signature_help.UpdateSignatureHelp(
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\signature_help.py", line 82, in UpdateSignatureHelp
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
    vim.eval( f"popup_close( { state.popup_win_id } )" )
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
vim.error: Vim:E994: Not allowed in a popup window
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
E858: Eval did not return a valid python object
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse:
line   11:
E171: Missing :endif

E382: Cannot write, 'buftype' option is set
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
Traceback (most recent call last):
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "<string>", line 1, in <module>
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\youcompleteme.py", line 360, in ClearSignatureHelp
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
    self.UpdateSignatureHelp( {} )
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\youcompleteme.py", line 366, in UpdateSignatureHelp
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
    self._signature_help_state = signature_help.UpdateSignatureHelp(
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\signature_help.py", line 82, in UpdateSignatureHelp
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
    vim.eval( f"popup_close( { state.popup_win_id } )" )
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
vim.error: Vim:E994: Not allowed in a popup window
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp[7]..BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse[11]..<SNR>29_ClearSignatureHelp:
line    7:
E858: Eval did not return a valid python object
Error detected while processing BufEnter Autocommands for "*"..function <SNR>29_OnBufferEnter[12]..<SNR>29_OnFileReadyToParse:
line   11:
E171: Missing :endif

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 14 2020 22:02:19)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-1845
Compiled by appveyor@APPVYR-WIN
Huge version with GUI.  Features included (+) or not (-):
+acl                +eval               +multi_byte_ime/dyn -tag_old_static
+arabic             +ex_extra           +multi_lang         -tag_any_white
+autocmd            +extra_search       +mzscheme/dyn       +tcl/dyn
+autochdir          -farsi              +netbeans_intg      -termguicolors
+autoservername     +file_in_path       +num64              +terminal
+balloon_eval       +find_in_path       +ole                -termresponse
-balloon_eval_term  +float              +packages           +textobjects
+browse             +folding            +path_extra         +textprop
++builtin_terms     -footer             +perl/dyn           -tgetent
+byte_offset        +gettext/dyn        +persistent_undo    +timers
+channel            -hangul_input       +popupwin           +title
+cindent            +iconv/dyn          -postscript         +toolbar
+clientserver       +insert_expand      +printer            +user_commands
+clipboard          +ipv6               +profile            +vartabs
+cmdline_compl      +job                +python/dyn         +vertsplit
+cmdline_hist       +jumplist           +python3/dyn        +virtualedit
+cmdline_info       +keymap             +quickfix           +visual
+comments           +lambda             +reltime            +visualextra
+conceal            +langmap            +rightleft          +viminfo
+cryptv             +libcall            +ruby/dyn           +vreplace
+cscope             +linebreak          +scrollbind         -vtp
+cursorbind         +lispindent         +signs              +wildignore
+cursorshape        +listcmds           +smartindent        +wildmenu
+dialog_con_gui     +localmap           +sound              +windows
+diff               +lua/dyn            +spell              +writebackup
+digraphs           +menu               +startuptime        -xfontset
+directx            +mksession          +statusline         -xim
-dnd                +modify_fname       -sun_workshop       +xpm_w32
-ebcdic             +mouse              +syntax             -xterm_save
+emacs_tags         +mouseshape         +tag_binary         
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE 
-DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6   
-DFEAT_XPM_W32   -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP 
-DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT /D_CRT_SECURE_NO_DEPRECATE 
/D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME 
-DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI 
-DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86
t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" 
-DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 
-DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python38.dll\" -DFEAT_MZSCHEME -I 
"C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME 
-DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\
" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL 
-DDYNAMIC_PERL_DLL=\"perl528.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64
-msvcrt-ruby240.dll\" -DRUBY_VERSION=24 -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link  /nologo /opt:ref /LTCG:STATUS /HIGHENTROPYVA:NO oldnames.lib kernel32.lib 
advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:AMD64 gdi32.lib 
version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib  /machine:AMD64  libcmt.lib 
oleaut32.lib user32.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib 
/nodefaultlib:python38.lib   "C:\Tcl\lib\tclstub86.lib" winmm.lib WSock32.lib Ws2_32.lib 
xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Resolve completions: On demand
-- Client logfile: C:\Users\mss\AppData\Local\Temp\ycm_a4v7c7cm.log
-- Server Python interpreter: C:\Program Files\Python38\python.exe
-- Server Python version: 3.8.3
-- Server has Clang support compiled in: True
-- Clang version: clang version 10.0.0 
-- Extra configuration file found and loaded
-- Extra configuration path: d:\code\vim\.ycm_extra_conf.py
-- C-family completer debug information:
--   Clangd running
--   Clangd process ID: 14768
--   Clangd executable: ['C:\\Users\\mss\\.vim\\bundle\\repos\\github.com\\ycm-core\\YouCompleteMe\\third_party\\ycmd\\third_party\\clangd\\output\\bin\\clangd.exe', '--header-insertion=never', '--include-ineligible-results', '-header-insertion-decorators=0', '-resource-dir=C:\\Users\\mss\\.vim\\bundle\\repos\\github.com\\ycm-core\\YouCompleteMe\\third_party\\ycmd\\third_party\\clang\\lib\\clang\\10.0.0']
--   Clangd logfiles:
--     C:\Users\mss\AppData\Local\Temp\clangd_stderrmjw49pwd.log
--   Clangd Server State: Initialized
--   Clangd Project Directory: d:\code\vim
--   Clangd Settings: {}
--   Clangd Compilation Command: ['clang-tool', '-fms-extensions', '-fms-compatibility', '-fms-compatibility-version=19', '-ferror-limit=10000', '-fexceptions', '-target', 'i686-pc-windows', '-DWIN32', '-D_WINDOWS', '-DNDEBUG', '-DWIN32_LEAN_AND_MEAN', '-D_CRT_SECURE_NO_WARNINGS', '-D_USING_V110_SDK71_', '-D_MBCS', '-std=c++14', '-x', 'c++', '-isystem', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.21.27702\\include', '-isystem', 'C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.16299.0\\ucrt', '-isystem', 'C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.16299.0\\winrt', 'd:\\code\\vim\\test.cpp']
-- Server running at: http://127.0.0.1:4601
-- Server process ID: 12340
-- Server logfiles:
--   C:\Users\mss\AppData\Local\Temp\ycmd_4601_stdout_wwfwgnd2.log
--   C:\Users\mss\AppData\Local\Temp\ycmd_4601_stderr_hv8fogzb.log

Output of YcmDiags

Paste output here

Output of git rev-parse HEAD in YouCompleteMe installation directory

6e4d1501e806267eeb4f53457ffd57a42708e9f0

Contents of YCM, ycmd and completion engine logfiles

Reproduce the issue with vim -Nu /path/to/YCM/vimrc_ycm_minimal, which enabled debug logging and other useful diagnostics. Include a link to a gist containing all of the log files listed by :YcmToggleLogs.

OS version, distribution, etc.

Windows 10 x64.

Output of build/install commands

Include link to a gist containing the invocation and entire output of install.py if reporting an installation issue.

bstaletic commented 4 years ago

I still can't repro, so all I can do is show a cleaned up error.

Error detected while processing
BufEnter Autocommands for "*"..
function <SNR>29_OnBufferEnter[12]..
         <SNR>29_OnFileReadyToParse[11]..
         <SNR>29_ClearSignatureHelp[7]..
         BufEnter Autocommands for "*"..
         function <SNR>29_OnBufferEnter[12]..
                  <SNR>29_OnFileReadyToParse[11]..
                  <SNR>29_ClearSignatureHelp:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\youcompleteme.py", line 360, in ClearSignatureHelp
    self.UpdateSignatureHelp( {} )
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\youcompleteme.py", line 366, in UpdateSignatureHelp
    self._signature_help_state = signature_help.UpdateSignatureHelp(
  File "C:\Users\mss\.vim\bundle\repos\github.com\ycm-core\YouCompleteMe\python\ycm\signature_help.py", line 82, in UpdateSignatureHelp
    vim.eval( f"popup_close( { state.popup_win_id } )" )
vim.error: Vim:E994: Not allowed in a popup window

E858: Eval did not return a valid python object
E171: Missing :endif
E382: Cannot write, 'buftype' option is set
puremourning commented 4 years ago

I can repro in gvim in windows.

puremourning commented 4 years ago

in fact, it's worse because vim gets stuck in a mode where you can't do anything, it just keeps saying "Not allowed in a popup window"

minimal vimrc:

" windows default encoding is not supported
set encoding=utf-8

set guifont=Lucida_Console:h9:cDEFAULT

" If you using neovim and python isn't loading, copy your python setup from your
" vimrc here:
"
" let g:python3_host_prog = '/path/to/python3/with/neovim/module'
"
" But remember that neovim is not officially supported, so please reproduce in
" Vim.

" Enable debugging
let g:ycm_keep_logfiles = 1
let g:ycm_log_level = 'debug'

" If the base settings don't repro, paste your existing config for YCM only,
" here:
" let g:ycm_....

" Load YCM (only)
let &rtp .= ',' . expand( '<sfile>:p:h' )

syntax on
filetype plugin indent on

let g:ycm_autoclose_preview_window_after_completion=0
let g:ycm_autoclose_preview_window_after_insertion=0
let g:ycm_add_preview_to_completeopt = 'popup'
let g:ycm_confirm_extra_conf = 0
let g:ycm_complete_in_comments=0
let g:ycm_log_level = 'error'
let g:ycm_collect_identifiers_from_comments_and_strings = 1

let g:ycm_seed_identifiers_with_syntax = 1

let g:ycm_auto_hover = ''

let g:ycm_use_clangd = 1
let g:ycm_clangd_args = ['--header-insertion=never', '--include-ineligible-results']
let g:ycm_clangd_uses_ycmd_caching = 0
ErrEoE commented 4 years ago

"popup_clear()" can't close terminal popup windows #5745

puremourning commented 4 years ago

I can repro in macOS on latest vim too.

puremourning commented 4 years ago

I think this was broken when we added completion in empty buffers.

We need to blacklist some more buftypes:

try this patch:

diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim
index 4cfb08dc..a5fa4a18 100644
--- a/autoload/youcompleteme.vim
+++ b/autoload/youcompleteme.vim
@@ -63,7 +63,9 @@ let s:pollers = {
 let s:buftype_blacklist = {
       \   'help': 1,
       \   'terminal': 1,
-      \   'quickfix': 1
+      \   'quickfix': 1,
+      \   'popup': 1,
+      \   'nofile': 1,
       \ }
 let s:last_char_inserted_by_user = v:true
 let s:enable_hover = 0
ErrEoE commented 4 years ago

Use this patch, I have not yet repro it.

puremourning commented 4 years ago

I think this is a workaround while we try and understand this.

let g:ycm_filetype_blacklist = {
      \ 'ycm_nofiletype': 1
      \ }

@habamax FYI. It looks like the patch to add empty-filetype support caused this really weird regression. I don't think that's strictly the issue, but it's highlighted a problem where the &filetype of popup windows shimmers:

Parsing file FileType cpp
Clear signature help File Ready to parse
Parsing file Resend
Clear signature help File Ready to parse
Enter buffer 2 ,  , popup
Reparse required for 2 ,  , popup : 0
Enter buffer 2 ,  ,
Reparse required for 2 ,  ,  : 1
Reqruies reparse 2 ,  ,
Parsing file OnBufferEnter
Clear signature help File Ready to parse
Enter buffer 1 , cpp ,

See there that buffer 2 goes from popup to ` buftype (Enter buffer 2 , &filetype , &buftype `). Ultimately this makes us try and parse the signature help popup and any preview popup that goes with it. I think it might be a vim bug, but we may have to revert the YCM change in the interim, or try and turn it off by default.

habamax commented 4 years ago

I have tried to get this error with python, golang and godot and couldn't repro anything similar there.

About reverting the patch -- yeah, would be unfortunate for me, but I always can use forked unreverted repo.

puremourning commented 4 years ago

I'm thinking that we could blacklist ycm_nofiletype for now (and you can "undo" that in your vimrc)

habamax commented 4 years ago

I'm thinking that we could blacklist ycm_nofiletype for now (and you can "undo" that in your vimrc)

yeah, sure!