We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 version
$ go version go version go1.12.1 linux/amd64 $ go list -m golang.org/x/tools golang.org/x/tools v0.0.0-20190328030505-8f05a32dce9f
Yes
go env
$ go env GOARCH="amd64" GOBIN="/home/myitcv/gostuff/src/github.com/myitcv/govim/.bin" GOCACHE="/home/myitcv/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/myitcv/gostuff" GOPROXY="" GORACE="" GOROOT="/home/myitcv/gos" GOTMPDIR="" GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/myitcv/gostuff/src/github.com/myitcv/govim/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-build709084862=/tmp/go-build -gno-record-gcc-switches"
Call textDocument/formatting to format the following:
textDocument/formatting
package govim const ( x = 5 )
A []TextEdit result that only contains non-zero-effect deltas.
[]TextEdit
A []TextEdit result that contained one zero-effect delta:
[]protocol.TextEdit{ { Range: protocol.Range{ Start: protocol.Position{Line:2, Character:0}, End: protocol.Position{Line:3, Character:0}, }, NewText: "", }, { Range: protocol.Range{ Start: protocol.Position{Line:3, Character:0}, End: protocol.Position{Line:4, Character:0}, }, NewText: "", }, { Range: protocol.Range{ Start: protocol.Position{Line:4, Character:0}, End: protocol.Position{Line:4, Character:0}, }, NewText: "const (\n", }, { Range: protocol.Range{ Start: protocol.Position{Line:4, Character:0}, End: protocol.Position{Line:4, Character:0}, }, NewText: "\tx = 5\n", }, { Range: protocol.Range{ Start: protocol.Position{Line:4, Character:0}, End: protocol.Position{Line:4, Character:0}, }, NewText: ")\n", }, { Range: protocol.Range{ Start: protocol.Position{Line:4, Character:0}, End: protocol.Position{Line:4, Character:0}, }, NewText: "", }, }
The last TextEdit implies zero delta.
TextEdit
cc @stamblerre
The text was updated successfully, but these errors were encountered:
This is my mistake. The last TextEdit is a blank line at the end of the file.
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Call
textDocument/formatting
to format the following:What did you expect to see?
A
[]TextEdit
result that only contains non-zero-effect deltas.What did you see instead?
A
[]TextEdit
result that contained one zero-effect delta:The last
TextEdit
implies zero delta.cc @stamblerre
The text was updated successfully, but these errors were encountered: