Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:GoInfo shows function signature truncated at { with gopls #2243

Closed
halega opened this issue Apr 26, 2019 · 0 comments · Fixed by #2244
Closed

:GoInfo shows function signature truncated at { with gopls #2243

halega opened this issue Apr 26, 2019 · 0 comments · Fixed by #2244

Comments

@halega
Copy link

halega commented Apr 26, 2019

What did you do? (required. The issue will be closed when not provided.)

  1. Set let g:go_info_mode='gopls' in .vimrc.
  2. Place the cursor at fmt.Println and execute :GoInfo.

What did you expect to happen?

GoInfo shows fmt.Println function full signature:

vim-go: func Println(a ...interface{}) (n int, err error)

What happened instead?

GoInfo shows fmt.Println function signature truncated at {:

vim-go: func Println(a ...interface

Configuration (MUST fill this out):

  • vim-go version: v1.20 (58cda9d)

  • vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

call plug#begin('~/vimfiles/plugged')
Plug 'fatih/vim-go'
call plug#end()

" go-vim
let g:go_template_autocreate = 0
let g:go_fmt_command = "goimports"
let g:go_def_mode='gopls'
let g:go_info_mode='gopls'
let g:go_metalinter_command='golangci-lint'
  • Vim version (first three lines from :version):
VIM - Vi IMproved 8.1
Included patches: 1-1201
  • Go version (go version): go version go1.12.4 windows/amd64

  • Go environment (go env):

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\kalashnikov_s\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\WLCR\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\KALASH~1\AppData\Local\Temp\go-build468378114=/tmp/go-build -gno-record-gcc-switches

Comments

There's no problem with gocode.

@halega halega changed the title :GoInfo truncates function signature at { with gopls :GoInfo shows function signature truncated at { with gopls Apr 26, 2019
bhcleek added a commit to bhcleek/vim-go that referenced this issue Apr 26, 2019
Only strip the '{' onwards on type struct and interface types so that
functions that have a parameter of type interface{} and function types
don't get truncated.

Fixes fatih#2243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant