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: gopls renaming should handle go1.19's Doc Links #57559

Open
thomaspeugeot opened this issue Jan 3, 2023 · 1 comment
Open
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@thomaspeugeot
Copy link

Doc Links has been added to the go in 1.19 and it is accessible in the AST. Enabling refactoring of DocLinks will improve the maintainability of documentation.

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

$ go version
go version go1.19.1 windows/amd64
$  gopls version
golang.org/x/tools/gopls v0.11.0
$ vscode-go v0.37

What did you do?

type Foo struct {
}
// struct [Foo] is a nice struct ...

Refactor "Foo" to "Bar"

What did you expect to see?

type Bar struct {
}
// struct [Bar] is a nice struct ...

What did you see instead?

type Bar struct {
}
// struct [Foo] is a nice struct ...
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jan 3, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jan 3, 2023
@findleyr findleyr changed the title x/tools/gopls: gopls should handle go1.19's Doc Links x/tools/gopls: gopls renaming should handle go1.19's Doc Links Jan 4, 2023
@findleyr
Copy link
Contributor

findleyr commented Jan 4, 2023

Thanks, this is a good point. We should extend our identifier detection to include the new doc link format.

@jamalc jamalc modified the milestones: Unreleased, gopls/later Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants