tenfyzhong / CompleteParameter.vim

Complete parameter after select the completion. Integration with YouCompleteMe(ycm), deoplete, neocomplete.
MIT License
261 stars 27 forks source link

YouCompleteMe error message corvered CompleteParameter signature message. #30

Open loop0day opened 6 years ago

loop0day commented 6 years ago

Issue Prelude

Completion Engine and Commit SHA

"-------------------------------------------------------------------------------
" install vim-plug automatically
"-------------------------------------------------------------------------------
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

"------------------------------------------------------------------------------- 
" plugin list
"------------------------------------------------------------------------------- 

" specify a directory for plugins
call plug#begin('~/.vim/plugged')

" YouCompleteMe
Plug 'Valloric/YouCompleteMe'

" airline status bar
Plug 'vim-airline/vim-airline'

" Official theme repository for vim-airline
Plug 'vim-airline/vim-airline-themes'

" complete parameter
Plug 'tenfyzhong/CompleteParameter.vim'

" init plugin system
call plug#end()

"-------------------------------------------------------------------------------
" YouCompleteMe Setting
"-------------------------------------------------------------------------------

" check configure file exist
if !empty(glob("~/.vim/plugged/YouCompleteMe/.ycm_extra_conf"))
  echoerr ".ycm_extra_conf must be exist!"
else
  " C-family Semantic Completion
  let g:ycm_global_ycm_extra_conf = '~/.vim/plugged/YouCompleteMe/.ycm_extra_conf.py'
endif

" complete string
let g:ycm_complete_in_strings = 1

" complete string
let g:ycm_complete_in_comments = 1

" minimun char nums
let g:ycm_min_num_identifier_candidate_chars = 2

" scan id from comments and strings
let g:ycm_collect_identifiers_from_comments_and_strings = 1

" close preview window
set completeopt-=preview

" custom key bind
let g:ycm_key_invoke_completion='<C-Z>'

" apply YCM FixIt
noremap <leader>f<space> :YcmCompleter FixIt<CR>

"-------------------------------------------------------------------------------
" airline Setting
"-------------------------------------------------------------------------------

" Integrating with powerline fonts
let g:airline_powerline_fonts = 1

" beautify tab line
let g:airline#extensions#tabline#enabled = 1

" airline Theme
let g:airline_theme = 'bubblegum'

"-------------------------------------------------------------------------------
" CompleteParameter Setting
"-------------------------------------------------------------------------------

inoremap <silent><expr> ( complete_parameter#pre_complete("()")

" keep value
let g:complete_parameter_py_keep_value = 1

" echo signature
let g:complete_parameter_echo_signature = 1

"-------------------------------------------------------------------------------
" My Setting
"-------------------------------------------------------------------------------

" not show mode status
set noshowmode
" set cmdheight = 2
set cmdheight=2

Issue Details

Messages

DasOhmoff commented 5 years ago

So how is it going? Could the issue be resolved?

tenfyzhong commented 5 years ago

@loop0day It's difficult to compatible with YCM. But, I think there's a good idea to disable the YCM's diagnostic and use ale to check the syntax error.

Plugin 'w0rp/ale'
let g:ycm_show_diagnostics_ui = 0
let g:ale_echo_cursor = 0