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

go_auto_type_info=1 disruptive when hovering over structs without godoc #2372

Closed
rocurley opened this issue Jun 28, 2019 · 0 comments · Fixed by #2373
Closed

go_auto_type_info=1 disruptive when hovering over structs without godoc #2372

rocurley opened this issue Jun 28, 2019 · 0 comments · Fixed by #2373

Comments

@rocurley
Copy link

rocurley commented Jun 28, 2019

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

Put the cursor over a struct name (Foo in the below example). Have g:go_auto_type_info=1.

package main

type Foo struct {
	a string
	b string
	c string
}

func main() {
	x = Foo{}
}

What did you expect to happen?

Focus remains in the editor window.

What happened instead?

Presumably because the struct definition spans multiple lines, the type info pops up a box that you need to press enter to escape. If you don't move your cursor, it will come bacl.

Configuration (MUST fill this out):

vim-go version:

d1c8ffb

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

vimrc
filetype plugin indent on
set nocompatible

call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
call plug#end()
let g:go_auto_type_info = 1

Vim version (first three lines from :version):

NVIM v0.3.5
Build type: RelWithDebInfo
LuaJIT 2.0.5

Go version (go version):

go version go1.12.6 linux/amd64

Go environment

go env Output:
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/rcurley/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/rcurley/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/rcurley/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build096570049=/tmp/go-build -gno-record-gcc-switches"

vim-go configuration:

vim-go configuration
g:go_fmt_command = 'goimports'
g:go_loaded_install = 1
g:go_auto_type_info = 1
g:go_jump_to_error = 1
g:go_loaded_gosnippets = 1
@rocurley rocurley changed the title go_auto_type_info disruptive when hovering over structs go_auto_type_info=1 disruptive when hovering over structs Jun 28, 2019
@bhcleek bhcleek changed the title go_auto_type_info=1 disruptive when hovering over structs go_auto_type_info=1 disruptive when hovering over structs without godoc Jun 28, 2019
bhcleek added a commit to bhcleek/vim-go that referenced this issue Jun 28, 2019
Do not strip the first line of hover content when the first line is not
godoc.

Fixes fatih#2372
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