Skip to content

gopls: set editor.suggest.snippetsPreventQuickSuggestions to true by default #839

Closed
@asankov

Description

What version of Go are you using (go version)?

$ go version
go version go1.14.4 darwin/amd64

Does this issue reproduce with the latest release?

Haven't tried, but pretty sure it will. Can try it, if necessary.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
$ go env    
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/anton_sankov/Library/Caches/go-build"
GOENV="/Users/anton_sankov/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY="none"
GONOSUMDB="*"
GOOS="darwin"
GOPATH="/Users/anton_sankov/go"
GOPROXY="https://artifactory-pub.bit9.local/artifactory/api/go/go"
GOROOT="/usr/local/Cellar/go/1.14.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3t/hsk9366s0h18crx6q0ygdn08g_3694/T/go-build677967668=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

What the problem is is better explained with video:

completion1

I am typing the function acceptString, I get a completion hint, click Enter and am send to enter the function arguments. However, once there the autocompletion does not work - it does not suggest anything to me, even when I start writing the function name(or variable name).

Workaround: If I press Esc twice, the autocompletion is working again. See:
completion2

Here, I type ret, then press Esc twice, and upon pressing u I get a suggestion to use returnString. However, now I have lost the parameter hints and have to trigger them again, which is not ideal for functions that accept more than 1 argument.

What did you expect to see?

I expect to have suggestions upon clicking Enter and start entering something.

What did you see instead?

No suggestions, until I press Esc twice and get out of that context.

I am willing to work on this and contribute a PR, if you would help me with finding where approximately is the code that handles this.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions