-
Notifications
You must be signed in to change notification settings - Fork 342
Add links in docs for predeclared types, remote dependencies, and WKTs #4137
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
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
private/buf/buflsp/symbol.go
Outdated
| } | ||
|
|
||
| func getCommentsFromDef(def ast.DeclDef) string { | ||
| func (s *symbol) getComments(def ast.DeclDef) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This func signature is a bit odd because it presumes that the def must be the same symbol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... I refactored this to be a little bit clearer, hopefully, let me know what you think!
private/buf/buflsp/symbol.go
Outdated
| components := strings.Split(bsrTooltip, ".") | ||
| bsrTooltip = strings.Join(components[:len(components)-1], ".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the string manipulation if you keep the type as the ir.FullName, then bsrTooltip.Parent().
private/buf/buflsp/symbol.go
Outdated
| )) | ||
| } | ||
| } | ||
| return strings.Join(comments, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a strings.Builder here would be better?
This adds the links back for predeclared types, remote deps,
and WKTs in the LSP doc hovers.