ycm-core / YouCompleteMe

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

g:ycm_extra_conf_globlist seem to not work under Windows #3084

Closed phush0 closed 6 years ago

phush0 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:

let g:ycm_extra_conf_globlist = ['~\*'] I have tried commands described in README.md with simple python script and result is proper path

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

Include description of the expected behaviour.

ycm have to report that have found global extra conf

ycm can't find it same is working under MacOSX

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

Diagnostic data

Output of vim --version

MS-Windows 32-bit GUI version with OLE support
Included patches: 1-196
Compiled by stop_@LAPTOP-E7OHISR4
Huge version with GUI.  Features included (+) or not (-):
+acl                +clientserver       +dialog_con_gui     +file_in_path       +keymap             +modify_fname       +perl/dyn           +scrollbind         -termguicolors      +virtualedit        -xim
+arabic             +clipboard          +diff               +find_in_path       +lambda             +mouse              +persistent_undo    +signs              +terminal           +visual             +xpm_w32
+autocmd            +cmdline_compl      +digraphs           +float              +langmap            +mouseshape         -postscript         +smartindent        -tgetent            +visualextra        -xterm_save
+autoservername     +cmdline_hist       +directx            +folding            +libcall            +multi_byte_ime/dyn +printer            +startuptime        -termresponse       +viminfo            
+balloon_eval       +cmdline_info       -dnd                -footer             +linebreak          +multi_lang         +profile            +statusline         +textobjects        +vreplace           
-balloon_eval_term  +comments           -ebcdic             +gettext/dyn        +lispindent         +mzscheme/dyn       +python/dyn         -sun_workshop       +timers             -vtp                
+browse             +conceal            +emacs_tags         -hangul_input       +listcmds           +netbeans_intg      +python3/dyn        +syntax             +title              +wildignore         
++builtin_terms     +cryptv             +eval               +iconv/dyn          +localmap           +num64              +quickfix           +tag_binary         +toolbar            +wildmenu           
+byte_offset        +cscope             +ex_extra           +insert_expand      +lua/dyn            +ole                +reltime            +tag_old_static     +user_commands      +windows            
+channel            +cursorbind         +extra_search       +job                +menu               +packages           +rightleft          -tag_any_white      +vartabs            +writebackup        
+cindent            +cursorshape        +farsi              +jumplist           +mksession          +path_extra         +ruby/dyn           +tcl/dyn            +vertsplit          -xfontset           
   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_NETBEANS_INTG -DFEAT_JOB_CHANNEL   -DFEAT_XPM_W32   -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /arch:IA32 /MD -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86.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=\"python37.dll\" -DFEAT_MZSCHEME -I "..\..\libs\racket-6.12\include" -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracketxxxxxxx.dll\" -DDYNAMIC_MZGC_DLL=\"libmzgcxxxxxxx.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl528.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=25 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby250.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZi386/ /Zi
Linking: link  /nologo /subsystem:windows /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:i386 gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib  /machine:i386  msvcrt.lib oleaut32.lib user32.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python37.lib   "C:\ActiveTcl_x86\lib\tclstub86.lib" WSock32.lib .\xpm\x86\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug ```
> Place the output here, or a link to a [gist][].

## Output of `YcmDebugInfo`
``` Printing YouCompleteMe debug information...
-- Client logfile: C:\Users\phush\AppData\Local\Temp\ycm_2eje2nxf.log
-- Server Python interpreter: C:\Python3\python3.exe
-- Server Python version: 3.7.0
-- Server has Clang support compiled in: True
-- Clang version: clang version 6.0.0 (tags/RELEASE_600/final)
-- No extra configuration file found
-- C-family completer debug information:
--   Compilation database path: C:\src\update_kernel\casa
--   Flags: ['arm-none-eabi-gcc', '-mcpu=cortex-m3', '-Os', '-ggdb', '-fomit-frame-pointer', '-falign-functions=16', '-msoft-float', '-fno-delete-null-pointer-checks', '-ffunction-sections', '-fdata-sections', '-fno-common', '-Wall', '-Wextra', '-Wstrict-prototypes', '-Wa,-alms=build/lst/version.lst', '-DTHUMB_PRESENT', '-mno-thumb-interwork', '-DTHUMB_NO_INTERWORKING', '-mthumb', '-DTHUMB', '-IC:\\src\\update_kernel\\casa', '-IC:\\src\\update_kernel\\casa\\os\\ports\\common\\ARMCMx\\CMSIS\\include', '-IC:\\src\\update_kernel\\casa\\os\\ports\\common\\ARMCMx', '-IC:\\src\\update_kernel\\casa\\os\\ports\\GCC\\ARMCMx', '-IC:\\src\\update_kernel\\casa\\os\\ports\\GCC\\ARMCMx\\STM32F1xx', '-IC:\\src\\update_kernel\\casa\\os\\kernel\\include', '-IC:\\src\\update_kernel\\casa\\os\\hal\\include', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32F1xx', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\GPIOv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\I2Cv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\RTCv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\SPIv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\USARTv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\USBv1', '-IC:\\src\\update_kernel\\casa\\boards\\perfect', '-IC:\\src\\update_kernel\\casa\\os\\various', '-IC:\\src\\update_kernel\\casa\\app\\lowlevel\\include', '-IC:\\src\\update_kernel\\casa\\app\\hilevel\\include', '-IC:\\src\\update_kernel\\casa\\app\\gprs\\include', '-IC:\\src\\update_kernel\\casa\\app\\bitmap\\include', '-IC:\\src\\update_kernel\\casa\\app\\barcode\\include', '-IC:\\src\\update_kernel\\casa\\app\\fatfs\\src', '-IC:\\src\\update_kernel\\casa\\app\\cryptocard\\include', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-1.4.1\\src\\include', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-1.4.1\\src\\include\\ipv4', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv\\enc28j60driver', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv\\enchw', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv\\lwip', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\arch', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\stm32', '-IC:\\src\\update_kernel\\casa\\app\\pos_ecr\\inc', 'version.c', '-resource-dir=C:\\Users\\phush\\.vim\\bundle\\YouCompleteMe\\third_party\\ycmd\\ycmd\\..\\clang_includes', '-fno-delayed-template-parsing', '-fspell-checking']
--   Translation unit: C:\src\update_kernel\casa\version.h
-- Server running at: http://127.0.0.1:51945
-- Server process ID: 1292
-- Server logfiles:
--   C:\Users\phush\AppData\Local\Temp\ycmd_51945_stdout_1w0bd1wy.log
--   C:\Users\phush\AppData\Local\Temp\ycmd_51945_stderr_76_g1953.log
E475: Invalid argument: @-
ClangParseError: An AST deserialization error occurred while parsing the translation unit.
Printing YouCompleteMe debug information...
-- Client logfile: C:\Users\phush\AppData\Local\Temp\ycm_2eje2nxf.log
-- Server Python interpreter: C:\Python3\python3.exe
-- Server Python version: 3.7.0
-- Server has Clang support compiled in: True
-- Clang version: clang version 6.0.0 (tags/RELEASE_600/final)
-- No extra configuration file found
-- C-family completer debug information:
--   Compilation database path: C:\src\update_kernel\casa
--   Flags: ['arm-none-eabi-gcc', '-mcpu=cortex-m3', '-Os', '-ggdb', '-fomit-frame-pointer', '-falign-functions=16', '-msoft-float', '-fno-delete-null-pointer-checks', '-ffunction-sections', '-fdata-sections', '-fno-common', '-Wall', '-Wextra', '-Wstrict-prototypes', '-Wa,-alms=build/lst/version.lst', '-DTHUMB_PRESENT', '-mno-thumb-interwork', '-DTHUMB_NO_INTERWORKING', '-mthumb', '-DTHUMB', '-IC:\\src\\update_kernel\\casa', '-IC:\\src\\update_kernel\\casa\\os\\ports\\common\\ARMCMx\\CMSIS\\include', '-IC:\\src\\update_kernel\\casa\\os\\ports\\common\\ARMCMx', '-IC:\\src\\update_kernel\\casa\\os\\ports\\GCC\\ARMCMx', '-IC:\\src\\update_kernel\\casa\\os\\ports\\GCC\\ARMCMx\\STM32F1xx', '-IC:\\src\\update_kernel\\casa\\os\\kernel\\include', '-IC:\\src\\update_kernel\\casa\\os\\hal\\include', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32F1xx', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\GPIOv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\I2Cv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\RTCv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\SPIv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\USARTv1', '-IC:\\src\\update_kernel\\casa\\os\\hal\\platforms\\STM32\\USBv1', '-IC:\\src\\update_kernel\\casa\\boards\\perfect', '-IC:\\src\\update_kernel\\casa\\os\\various', '-IC:\\src\\update_kernel\\casa\\app\\lowlevel\\include', '-IC:\\src\\update_kernel\\casa\\app\\hilevel\\include', '-IC:\\src\\update_kernel\\casa\\app\\gprs\\include', '-IC:\\src\\update_kernel\\casa\\app\\bitmap\\include', '-IC:\\src\\update_kernel\\casa\\app\\barcode\\include', '-IC:\\src\\update_kernel\\casa\\app\\fatfs\\src', '-IC:\\src\\update_kernel\\casa\\app\\cryptocard\\include', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-1.4.1\\src\\include', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-1.4.1\\src\\include\\ipv4', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv\\enc28j60driver', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv\\enchw', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv\\lwip', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\enc28j60drv', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\arch', '-IC:\\src\\update_kernel\\casa\\app\\lwip\\lwip-port\\stm32', '-IC:\\src\\update_kernel\\casa\\app\\pos_ecr\\inc', 'version.c', '-resource-dir=C:\\Users\\phush\\.vim\\bundle\\YouCompleteMe\\third_party\\ycmd\\ycmd\\..\\clang_includes', '-fno-delayed-template-parsing', '-fspell-checking']
--   Translation unit: C:\src\update_kernel\casa\version.h
-- Server running at: http://127.0.0.1:51945
-- Server process ID: 1292
-- Server logfiles:
--   C:\Users\phush\AppData\Local\Temp\ycmd_51945_stdout_1w0bd1wy.log
--   C:\Users\phush\AppData\Local\Temp\ycmd_51945_stderr_76_g1953.log

Place the output here, or a link to a gist.

Contents of YCM, ycmd and completion engine logfiles

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.

Platform ServicePack Version VersionString


Win32NT 10.0.17134.0 Microsoft Windows NT 10.0.17134.0

Include system information here.

Output of build/install commands

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

puremourning commented 6 years ago

Does it work if you use / or \\ instead of \* ?

micbou commented 6 years ago

Where is the .ycm_extra_conf.py file that is supposed to be automatically loaded?

ycm have to report that have found global extra conf

You need to set the g:ycm_global_ycm_extra_conf option for that. g:ycm_extra_conf_globlist is for regular .ycm_extra_conf.py files.

Does it work if you use / or \ instead of * ?

Backslashes don't need to be escaped when single quotes are used in Vimscript.

phush0 commented 6 years ago

so let me explain more:

In MacOSX I have on global file .ycm_extra_conf.py which is placed in my home directory and setting let g:ycm_extra_conf_globlist = ['~/*'] is working perfect, I use only one such file for all my projects.

Recently I have to move to WIndows and moved the same .vim config and same .ycm_extra_conf.py to my windows system. Extra conf is working if placed in project dir.

I have tired:

~/* ~\\* ~\* C:\\Users\my_user\\* C:\Users\my_user\* C:/Users/my_user/*

even placed file name none of them is seaming to work.

micbou commented 6 years ago

Your project is not under the C:\Users\my_user directory so it can't find your .ycm_extra_conf.py file. Like I said, you should use the g:ycm_global_ycm_extra_conf option to specify a global extra conf.

phush0 commented 6 years ago

The g:ycm_global_ycm_extra_conf works, but on MacOS ot is working only with globlist. Problem solved please close the topic