jayli / vim-easycomplete

杭州市余杭区最好用的 VIM/NVIM 代码补全插件
MIT License
408 stars 26 forks source link

安装插件之后启动 vim 时将报错。 #2

Closed Sollovin closed 5 years ago

Sollovin commented 5 years ago

安装完插件之后启动 vim 将有如下报错: error_easycomplete

使用的 vim 插件管理器是 vimplug .vimrc 文件:

" ------------------------------------------
" vim-plug
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'

" auto install vim-plu
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

call plug#begin('~/.vim/plugged')

" Make sure you use single quotes

" Graphviz
Plug 'liuchengxu/graphviz.vim'
let g:graphviz_output_format = 'svg'

" LaTeX
Plug 'lervag/vimtex', { 'for': 'latex'}

" Fortran
let fortran_free_source = 1
Plug 'rudrab/vimf90', { 'for': 'fortran'}
"Plug 'vim-scripts/fortran_line_length'

" Markdown Syntax
Plug 'plasticboy/vim-markdown', { 'for': 'markdown'}

" Markdown Preview with Mathjax Support
Plug 'iamcco/mathjax-support-for-mkdp', { 'on': 'MarkdownPreview', 'for': 'markdown'}
Plug 'iamcco/markdown-preview.vim', { 'on': 'MarkdownPreview', 'for': 'markdown'}
let g:mkdp_path_to_chrome = "/usr/bin/qutebrowser" " use qutebrowser as default preview browwer

" Syntax check
Plug 'w0rp/ale'

" SnipMate 携带的四个插件
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'

" EasyComplete 插件和 Dictionary 词表(依赖 SnipMate
Plug 'jayli/vim-easycomplete'
Plug 'jayli/vim-dictionary'

"" Code Completion
"" Require packages: build-essential cmake python3-dev
"" run `./install.py --clang-completer` after install 
"function! BuildYCM(info)
"  " info is a dictionary with 3 fields
"  " - name:   name of the plugin
"  " - status: 'installed', 'updated', or 'unchanged'
"  " - force:  set on PlugInstall! or PlugUpdate!
"  if a:info.status == 'installed' || a:info.force
"    !./install.py
"  endif
"endfunction
"Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM')}

" NERD tree with git status support
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on':  'NERDTreeToggle' }

" Status Bar
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
let g:airline_powerline_fonts = 1
let g:airline_theme='minimalist'

" Rainbow Patentheses
" Plug 'kien/rainbow_parentheses.vim'
" au VimEnter * RainbowParenthesesToggle
" au Syntax * RainbowParenthesesLoadRound
" au Syntax * RainbowParenthesesLoadSquare
" au Syntax * RainbowParenthesesLoadBraces
Plug 'luochen1990/rainbow'
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle

" Initialize plugin system
call plug#end()

" -----------------------------------------
" Hollow's vim config
" Reference on https://dougblack.io/words/a-good-vimrc.html

" Colors
"colorscheme blackboard
syntax enable " enable syntax processing

" Spaces & Tabs
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab " tabs are spaces
set shiftwidth=4 " numbers of space to indent

" UI Config
set number " show line numbers
set showcmd " show command in bottom bar
"set cursorline " highlight current line
filetype indent on " load filetype-specific indent files
set wildmenu " visual autocomplete for command menu
set lazyredraw " redraw only when we need to, seemed to cause latency, reference on StacksOverflow
set showmatch " highlight matching [{()}]

" Searching 
set incsearch " search as characters are entered
set hlsearch " highlight matches
" turn off search highlight 
nnoremap <leader><space> :nohlsearch<CR>

" Folding
set foldenable " enable folding
set foldlevelstart=10 " open most folds by defaults
set foldnestmax=10 " 10 nested fold max
" space open/closes folds
nnoremap <space> za
set foldmethod=indent " fold based on indent level(Run ':help foldmethod' for more details)

" Movement
" move vertically by visual line
nnoremap j gj
nnoremap k gk
" replacing $/^ with B/E to movr to the beginning/end of line
nnoremap B ^
nnoremap E $
nnoremap ^ <nop>
nnoremap & <nop>
" highlight last inserted text
nnoremap gV `[v`]

" Leader Shortcuts
let mapleader ="," " leader is comma
let maplocalleader = "\\" " localleader is \\
" jk is escape
"inoremap jk <esc>
" toggle gundo
nnoremap <leader>u :GundoToggle<CR>
" edit vimrc/fishrc and load vimrc bindings
nnoremap <leader>ev :vsp $MYVIMRC<CR>
nnoremap <leader>ef :vsp ~/.config/fish/config.fish
nnoremap <leader>sv :source $MYVIMRC<CR>
" save session, reopen with 'vim -S'
nnoremap <leader>s :mksession<CR>
" open ag.vim, which is a fantastic line tool to search source code without leaving Vim and pulls the results into a quickfix window
nnoremap <leader>a :Ag

" input custom symbols 『』, 「」 with ^', ^;
inoremap <F6> 『』<Esc>i
inoremap <F7> 「」<Esc>i

" txt 中文 乱码
" set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1
set enc=utf8
set fencs=utf8,gbk,gb2312,gb18030

vim version:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun  5 2019 14:31:35)
Included patches: 1-1467
Compiled by Arch Linux
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     -tag_old_static
+arabic            -farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    +tcl/dyn
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
+balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
+browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +textprop
+byte_offset       -hangul_input      +num64             +timers
+channel           +iconv             +packages          +title
+cindent           +insert_expand     +path_extra        +toolbar
+clientserver      +job               +perl/dyn          +user_commands
+clipboard         +jumplist          +persistent_undo   +vartabs
+cmdline_compl     +keymap            +postscript        +vertsplit
+cmdline_hist      +lambda            +printer           +virtualedit
+cmdline_info      +langmap           +profile           +visual
+comments          +libcall           +python/dyn        +visualextra
+conceal           +linebreak         +python3/dyn       +viminfo
+cryptv            +lispindent        +quickfix          +vreplace
+cscope            +listcmds          +reltime           +wildignore
+cursorbind        +localmap          +rightleft         +wildmenu
+cursorshape       +lua/dyn           +ruby/dyn          +windows
+dialog_con_gui    +menu              +scrollbind        +writebackup
+diff              +mksession         +signs             +X11
+digraphs          +modify_fname      +smartindent       -xfontset
+dnd               +mouse             +startuptime       +xim
-ebcdic            +mouseshape        +statusline        -xpm
+emacs_tags        +mouse_dec         -sun_workshop      +xsmp_interact
+eval              +mouse_gpm         +syntax            +xterm_clipboard
+ex_extra          -mouse_jsbterm     +tag_binary        -xterm_save
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi-3.2.1/include -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread  -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.30/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lelf -lnsl    -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.30/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/5.30/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm
Bivectorfoil commented 5 years ago

let g:pmenu_scheme = 'dark' .vimrc文件里需要加上这行,或者其他的配置模式

Sollovin commented 5 years ago

let g:pmenu_scheme = 'dark' .vimrc 文件里需要加上这行,或者其他的配置模式

好的,确实是因为缺失了这一项配置,谢谢!