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

x/tools/gopls: markdown code block should be space not   #40947

Closed
wingyplus opened this issue Aug 21, 2020 · 4 comments
Closed

x/tools/gopls: markdown code block should be space not   #40947

wingyplus opened this issue Aug 21, 2020 · 4 comments
Labels
Milestone

Comments

@wingyplus
Copy link
Contributor

@wingyplus wingyplus commented Aug 21, 2020

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

$ go version
go version go1.14 darwin/amd64
$ gopls version
golang.org/x/tools/gopls 0.4.3
    golang.org/x/tools/gopls@v0.4.3 h1:irz7Q+XdHNECamFKbNWKvMV2Ak6zBbwdwbZndG4545I=

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/thanabodee/Library/Caches/go-build"
GOENV="/Users/thanabodee/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY="**HIDDEN**/*"
GONOSUMDB="**HIDDEN**/*"
GOOS="darwin"
GOPATH="/Users/thanabodee"
GOPRIVATE="**HIDDEN**/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/thanabodee/tools/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/thanabodee/tools/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/thanabodee/src/github.com/wingyplus/md_to_con_table/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/x7/tl6gyzn92vzcr35t94xgt6y00000gp/T/go-build295258946=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I using gopls with vim-lsp (together with neovim). When calling LspHover, I see like the image below:

Screen Shot 2563-08-21 at 11 05 51

What did you expect to see?

4 space characters.

What did you see instead?

4  .

More information

Padding was introduced by https://go-review.googlesource.com/c/tools/+/197760 (and related to #34161). But the original converter which written in TypeScript in this line use 4 space padding. I think it can be replace by space characters which is a valid markdown syntax.

@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2020
@wingyplus
Copy link
Contributor Author

@wingyplus wingyplus commented Aug 21, 2020

May I ask which markdown spec use in lsp. I didn't see it in lsp specification.

@wingyplus
Copy link
Contributor Author

@wingyplus wingyplus commented Aug 21, 2020

It seems gopls use GitHub markdown as a markdown specification (https://github.github.com/gfm/). Not sure it's.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v.0.5.0 Aug 25, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 26, 2020

Change https://golang.org/cl/250697 mentions this issue: internal/lsp/source: use space character in markdown formatting

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Aug 26, 2020

Thanks for this report. Based on the way that blackfriday.Run is displayed on https://pkg.go.dev, I agree that this is not correct. Here is the before and after in VS Code:

Before:
Screen Shot 2020-08-25 at 10 17 17 PM

After:
Screen Shot 2020-08-25 at 10 18 14 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.