sheerun / vim-polyglot

A solid language pack for Vim.
5.6k stars 298 forks source link

Can't source vimrc file because vim-polyglot file have same name with built-in file. #782

Open hungpham3112 opened 2 years ago

hungpham3112 commented 2 years ago

here is the output of :scriptnames:

  1: ~\vimfiles\vimrc
  2: ~\vimfiles\autoload\vim-plug_settings.vim
  3: ~\vimfiles\autoload\plug.vim
  4: ~\vimfiles\plugged\vim-polyglot\filetype.vim ( This one)
  5: ~\vimfiles\plugged\vim-polyglot\autoload\polyglot\init.vim
  6: ~\scoop\apps\vim-nightly\current\filetype.vim ( And this one)
  7: ~\vimfiles\plugged\vim-polyglot\ftdetect\polyglot.vim
  8: ~\vimfiles\plugged\vim-fugitive\ftdetect\fugitive.vim
  9: ~\scoop\apps\vim-nightly\current\menu.vim
 10: ~\scoop\apps\vim-nightly\current\autoload\paste.vim
 11: ~\scoop\apps\vim-nightly\8.2.4478\ftplugin.vim
 12: ~\scoop\apps\vim-nightly\8.2.4478\indent.vim
 13: ~\scoop\apps\vim-nightly\current\syntax\syntax.vim
 14: ~\scoop\apps\vim-nightly\8.2.4478\syntax\synload.vim
 15: ~\scoop\apps\vim-nightly\8.2.4478\syntax\syncolor.vim
 16: ~\scoop\apps\vim-nightly\8.2.4478\colors\lists\default.vim
 17: ~\vimfiles\plugin\appearance\colorscheme_settings.vim
 18: ~\vimfiles\autoload\general_settings.vim
 19: ~\vimfiles\plugged\edge\colors\edge.vim
 20: ~\vimfiles\plugged\edge\autoload\edge.vim
 21: ~\vimfiles\plugin\appearance\autoresize_settings.vim
 22: ~\vimfiles\plugin\appearance\hexokinase_settings.vim
 23: ~\vimfiles\plugin\appearance\indentline_settings.vim
 24: ~\vimfiles\plugin\appearance\lightline_settings.vim
 25: ~\vimfiles\plugin\appearance\vim-startify_settings.vim
 26: ~\vimfiles\plugin\appearance\webdevicons_settings.vim
 27: ~\vimfiles\plugin\autocomplete_engine\coc-nvim_settings.vim
 28: ~\vimfiles\plugin\autocomplete_engine\emmet_settings.vim
 29: ~\vimfiles\plugin\searching\easymotion_settings.vim
 30: ~\vimfiles\plugin\searching\fzf_settings.vim
 31: ~\vimfiles\plugin\searching\nerdtree_settings.vim
 32: ~\vimfiles\plugin\searching\tagbars_settings.vim
 33: ~\vimfiles\plugin\utils\autopair_settings.vim
 34: ~\vimfiles\plugin\utils\floaterm_settings.vim
 35: ~\vimfiles\plugin\utils\keybinding_settings.vim
 36: ~\vimfiles\plugin\utils\markdown-preview_settings.vim
 37: ~\vimfiles\plugin\utils\runcode_settings.vim
 38: ~\vimfiles\plugin\utils\vide_command.vim
 39: ~\vimfiles\plugin\utils\vim-which-key_settings.vim
 40: ~\vimfiles\user_config.vim
 41: ~\vimfiles\plugin\utils\vim-move_settings.vim
 42: ~\vimfiles\plugged\vim-snippets\plugin\vimsnippets.vim
 43: ~\vimfiles\plugged\nerdtree\plugin\NERD_tree.vim
 44: ~\vimfiles\plugged\nerdtree\autoload\nerdtree.vim
 45: ~\vimfiles\plugged\nerdtree\lib\nerdtree\path.vim
 46: ~\vimfiles\plugged\nerdtree\lib\nerdtree\menu_controller.vim
 47: ~\vimfiles\plugged\nerdtree\lib\nerdtree\menu_item.vim
 48: ~\vimfiles\plugged\nerdtree\lib\nerdtree\key_map.vim
 49: ~\vimfiles\plugged\nerdtree\lib\nerdtree\bookmark.vim
 50: ~\vimfiles\plugged\nerdtree\lib\nerdtree\tree_file_node.vim
 51: ~\vimfiles\plugged\nerdtree\lib\nerdtree\tree_dir_node.vim
 52: ~\vimfiles\plugged\nerdtree\lib\nerdtree\opener.vim
 53: ~\vimfiles\plugged\nerdtree\lib\nerdtree\creator.vim
 54: ~\vimfiles\plugged\nerdtree\lib\nerdtree\flag_set.vim
 55: ~\vimfiles\plugged\nerdtree\lib\nerdtree\nerdtree.vim
 56: ~\vimfiles\plugged\nerdtree\lib\nerdtree\ui.vim
 57: ~\vimfiles\plugged\nerdtree\lib\nerdtree\event.vim
 58: ~\vimfiles\plugged\nerdtree\lib\nerdtree\notifier.vim
 59: ~\vimfiles\plugged\nerdtree\autoload\nerdtree\ui_glue.vim
 60: ~\vimfiles\plugged\nerdtree\nerdtree_plugin\exec_menuitem.vim
 61: ~\vimfiles\plugged\nerdtree\nerdtree_plugin\fs_menu.vim
 62: ~\vimfiles\plugged\nerdtree\nerdtree_plugin\vcs.vim
 63: ~\vimfiles\plugged\vim-devicons\nerdtree_plugin\webdevicons.vim
 64: ~\vimfiles\plugged\tagbar\plugin\tagbar.vim
 65: ~\vimfiles\plugged\nerdcommenter\plugin\nerdcommenter.vim
 66: ~\vimfiles\plugged\vim-floaterm\plugin\floaterm.vim
 67: ~\vimfiles\plugged\fzf-floaterm\plugin\fzf_floaterm.vim
 68: ~\vimfiles\plugged\vim-easymotion\plugin\EasyMotion.vim
 69: ~\vimfiles\plugged\incsearch.vim\plugin\incsearch.vim
 70: ~\vimfiles\plugged\incsearch-easymotion.vim\plugin\incsearch\easymotion.vim
 71: ~\vimfiles\plugged\incsearch-fuzzy.vim\plugin\incsearch\fuzzy.vim
 72: ~\vimfiles\plugged\vim-asterisk\plugin\asterisk.vim
 73: ~\vimfiles\plugged\fzf\plugin\fzf.vim
 74: ~\vimfiles\plugged\fzf.vim\plugin\fzf.vim
 75: ~\vimfiles\plugged\coc.nvim\plugin\coc.vim
 76: ~\vimfiles\plugged\coc.nvim\autoload\coc\rpc.vim
 77: ~\vimfiles\plugged\coc.nvim\autoload\coc\util.vim
 78: ~\vimfiles\plugged\coc.nvim\autoload\coc\client.vim
 79: ~\vimfiles\plugged\emmet-vim\plugin\emmet.vim
 80: ~\vimfiles\plugged\vim-surround\plugin\surround.vim
 81: ~\vimfiles\plugged\auto-pairs\plugin\auto-pairs.vim
 82: ~\vimfiles\plugged\lightline.vim\plugin\lightline.vim
 83: ~\vimfiles\plugged\vim-gitbranch\plugin\gitbranch.vim
 84: ~\vimfiles\plugged\lightline-bufferline\plugin\bufferline.vim
 85: ~\vimfiles\plugged\lightline-bufferline\autoload\lightline\bufferline.vim
 86: ~\vimfiles\plugged\vim-devicons\plugin\webdevicons.vim
 87: ~\vimfiles\plugged\vim-fugitive\plugin\fugitive.vim
 88: ~\vimfiles\plugged\vim-autoresize\plugin\autoresize.vim
 89: ~\vimfiles\plugged\jupyter-vim\plugin\jupyter.vim
 90: ~\vimfiles\plugged\vim-which-key\plugin\which_key.vim
 91: ~\vimfiles\plugged\vim-startuptime\plugin\startuptime.vim
 92: ~\vimfiles\plugged\vim-startify\plugin\startify.vim
 93: ~\vimfiles\plugged\vim-visual-multi\plugin\visual-multi.vim
 94: ~\vimfiles\plugged\vim-visual-multi\autoload\vm\plugs.vim
 95: ~\vimfiles\plugged\vim-visual-multi\autoload\vm\maps.vim
 96: ~\vimfiles\plugged\vim-visual-multi\autoload\vm\maps\all.vim
 97: ~\vimfiles\plugged\vim-move\plugin\move.vim
 98: ~\vimfiles\plugged\vim-polyglot\plugin\polyglot.vim
 99: ~\scoop\apps\vim-nightly\8.2.4478\macros\matchit.vim
100: ~\scoop\apps\vim-nightly\current\pack\dist\opt\matchit\plugin\matchit.vim
101: ~\scoop\apps\vim-nightly\8.2.4478\plugin\getscriptPlugin.vim
102: ~\scoop\apps\vim-nightly\8.2.4478\plugin\gzip.vim
103: ~\scoop\apps\vim-nightly\8.2.4478\plugin\logiPat.vim
104: ~\scoop\apps\vim-nightly\8.2.4478\plugin\manpager.vim
105: ~\scoop\apps\vim-nightly\8.2.4478\plugin\matchparen.vim
106: ~\scoop\apps\vim-nightly\8.2.4478\plugin\netrwPlugin.vim
107: ~\scoop\apps\vim-nightly\8.2.4478\plugin\rrhelper.vim
108: ~\scoop\apps\vim-nightly\8.2.4478\plugin\spellfile.vim
109: ~\scoop\apps\vim-nightly\8.2.4478\plugin\tarPlugin.vim
110: ~\scoop\apps\vim-nightly\8.2.4478\plugin\tohtml.vim
111: ~\scoop\apps\vim-nightly\8.2.4478\plugin\vimballPlugin.vim
112: ~\scoop\apps\vim-nightly\8.2.4478\plugin\zipPlugin.vim
113: ~\vimfiles\plugged\indentLine\after\plugin\indentLine.vim
114: ~\vimfiles\plugged\dracula\after\plugin\dracula.vim
115: ~\vimfiles\plugged\dracula\autoload\dracula.vim
116: ~\vimfiles\plugged\lightline.vim\autoload\lightline.vim
117: ~\vimfiles\plugged\coc.nvim\autoload\coc.vim
118: ~\vimfiles\plugged\vim-gitbranch\autoload\gitbranch.vim
119: ~\vimfiles\plugged\lightline.vim\autoload\lightline\tab.vim
120: ~\vimfiles\plugged\edge\autoload\lightline\colorscheme\edge.vim
121: ~\vimfiles\plugged\lightline.vim\autoload\lightline\colorscheme.vim
122: ~\vimfiles\plugged\vim-startify\autoload\startify.vim
123: ~\vimfiles\plugged\vim-startify\autoload\startify\fortune.vim
124: ~\vimfiles\plugged\vim-startify\syntax\startify.vim
125: ~\vimfiles\plugged\coc.nvim\autoload\coc\api.vim
126: ~\AppData\Local\Temp\coc.nvim-14396.vim\coc-14396.vim
127: ~\vimfiles\plugged\coc.nvim\autoload\coc\float.vim
128: ~\vimfiles\plugged\coc.nvim\autoload\coc\window.vim
129: ~\AppData\Local\coc\extensions\node_modules\coc-explorer\plugin\coc_explorer.vim
130: ~\AppData\Local\coc\extensions\node_modules\coc-explorer\autoload\coc_explorer\highlight.vim
131: ~\AppData\Local\coc\extensions\node_modules\coc-explorer\autoload\coc_explorer\mappings.vim
132: ~\AppData\Local\coc\extensions\node_modules\coc-explorer\autoload\coc_explorer\tab.vim
133: ~\scoop\apps\vim-nightly\8.2.4478\ftplugin\vim.vim
134: ~\scoop\apps\vim-nightly\8.2.4478\indent\vim.vim
135: ~\scoop\apps\vim-nightly\8.2.4478\syntax\vim.vim
136: ~\scoop\apps\vim-nightly\8.2.4478\syntax\python.vim
137: ~\vimfiles\plugged\dracula\after\syntax\vim.vim
138: ~\vimfiles\plugged\coc.nvim\autoload\coc\compat.vim
139: ~\vimfiles\plugged\vim-autoresize\autoload\autoresize.vim

You can see in fourth and sixth lines, it have the same name. When source file it cause a bug:

image

Vim version:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 26 2022 23:02:53)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-4478
Compiled by appveyor@APPVYR-WIN
Huge version with GUI.  Features included (+) or not (-):
+acl                +cmdline_info       +extra_search       +langmap            +num64              +scrollbind         -termresponse       -vtp
+arabic             +comments           -farsi              +libcall            +ole                +signs              +textobjects        +wildignore
+autocmd            +conceal            +file_in_path       +linebreak          +packages           +smartindent        +textprop           +wildmenu
+autochdir          +cryptv             +find_in_path       +lispindent         +path_extra         +sodium/dyn         -tgetent            +windows
+autoservername     +cscope             +float              +listcmds           +perl/dyn           +sound              +timers             +writebackup
+balloon_eval       +cursorbind         +folding            +localmap           +persistent_undo    +spell              +title              -xfontset
-balloon_eval_term  +cursorshape        -footer             +lua/dyn            +popupwin           +startuptime        +toolbar            -xim
+browse             +dialog_con_gui     +gettext/dyn        +menu               -postscript         +statusline         +user_commands      +xpm_w32
++builtin_terms     +diff               -hangul_input       +mksession          +printer            -sun_workshop       +vartabs            -xterm_save
+byte_offset        +digraphs           +iconv/dyn          +modify_fname       +profile            +syntax             +vertsplit          
+channel            +directx            +insert_expand      +mouse              +python/dyn         +tag_binary         +vim9script         
+cindent            -dnd                +ipv6               +mouseshape         +python3/dyn        -tag_old_static     +viminfo            
+clientserver       -ebcdic             +job                +multi_byte_ime/dyn +quickfix           -tag_any_white      +virtualedit        
+clipboard          +emacs_tags         +jumplist           +multi_lang         +reltime            -tcl                +visual             
+cmdline_compl      +eval               +keymap             +mzscheme/dyn       +rightleft          -termguicolors      +visualextra        
+cmdline_hist       +ex_extra           +lambda             +netbeans_intg      +ruby/dyn           +terminal           +vreplace           
   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 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6   -DFEAT_XPM_W32 -DHAVE_SODIUM -DDYNAMIC_SODIUM /I "C:\libsodium\include" -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_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python310.dll\" -DFEAT_MZSCHEME -I "C:\racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_da32rk.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_da32rk.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl532.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby300.dll\" -DRUBY_VERSION=30 -DFEAT_HUGE /Fd.\ObjGXOULYHRZAMD64/ /Zi
Linking: link /nologo /opt:ref /LTCG /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib user32.lib  /machine:AMD64 version.lib  winspool.lib comctl32.lib  libcmt.lib oleaut32.lib  /nodefaultlib:lua54.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python310.lib    winmm.lib WSock32.lib Ws2_32.lib xpm\x64\lib-vc14\libXpm.lib  /PDB:gvim.pdb -debug

I reported this issue to vim win32 https://github.com/vim/vim-win32-installer/issues/252#issuecomment-1053831389

yaegassy commented 2 years ago

There seems to have been a change in Vim8 since this commit. Because of this, TestFiletypeFuncs errors are appearing in vim-polyglot. I think it needs to be adjusted on the vim-polyglot side. https://github.com/vim/vim/commit/8e5ba693ad9377fbf4b047093624248b81eac854

hungpham3112 commented 2 years ago

There seems to have been a change in Vim8 since this commit. Because of this, TestFiletypeFuncs errors are appearing in vim-polyglot. I think it needs to be adjusted on the vim-polyglot side. vim/vim@8e5ba69

It seems they don't fix this issue. 7 days pass.

yaegassy commented 2 years ago

As a side note, "Neovim" already has the 8.2.4411 patch for vim8, so the same problem occurs. https://github.com/neovim/neovim/commit/1fd106ca88a606241e1e1fb8c73645dcea5ea5c8

hungpham3112 commented 2 years ago

Reference

This project may not maintain anymore. I don't see any reply for nearly 1 month :((

ptzz commented 2 years ago

Should be fixed by #796.

hungpham3112 commented 2 years ago

I tested and it still have error.

image

hungpham3112 commented 2 years ago

Any update for this issue? Because it still exists to me.