tenfyzhong/CompleteParameter.vim

Fails to insert arguments for Golang

danihodovic opened this issue · 2 comments

First of all, thank you for an amazing plugin! I've been looking everywhere for something like this.

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing you issue:

  • I have read and understood CompleteParameter's README,
    especially the Frequently Asked Questions section.
  • I have searched CompleteParameters's issue tracker to find issues similar
    to the one I'm about to report and couldn't find an answer to my problem.
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have attached the contents of log follow the steps.
    1. Execute let g:complete_parameter_log_level = 1.
    2. Replay you action.
    3. Execute messages.
    4. Copy the output and place it to next section.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

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:

  • What did you do?

I'm using vim-go and CompleteParameter.vim to insert Golang completions. Inserting parameters fails with a :doautocmd User CompleteParameterFailed.

  • What did you expect to happen?

I expected it to insert dummy parameters into the function.

  • What actually happened?

Inserting parameters fails with a :doautocmd User CompleteParameterFailed.

Diagnostic data

Language

Golang

Output of vim --version

$ nvim --version
Alias tip: v --version
NVIM v0.2.1-dev
Build type: RelWithDebInfo
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/build/config -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/src -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/.deps/usr/include -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/.deps/usr/include -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/.deps/usr/include -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/.deps/usr/include -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/.deps/usr/include -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/.deps/usr/include -I/usr/include -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/build/src/nvim/auto -I/build/neovim-KAEFpM/neovim-0.2.0ubuntu1+git201705081829+3414+24~ubuntu16.04.1/build/include
Compiled by root@lgw01-09

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Output of message

"main.go" 187L, 4042C
TRACE:1: s:completed_word: Post
TRACE:1: select_complete_word: Post(
Press ENTER or type command to continue

OS version, distribution, etc.

$ uname -a
Linux dani-T440s 4.10.0-22-generic #24-Ubuntu SMP Mon May 22 17:43:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

The problem seems to have been that I used a combination of Valloric/YouCompleteMe, fatih/vim-go and jiangmiao/auto-pairs plugins. Disabling jiangmiao/auto-pairs and fatih/vim-go solved the problem.

Update: Actually it works with all three plugins as long as you disable ( insertion for autopairs.

let g:AutoPairs = {'[':']', '{':'}',"'":"'",'"':'"', '`':'`'}