Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: consider moving methods inside its type in outline view #40931
@emil14 Thanks! Yeah, I observed that when not using the language server, the outline view grouped methods under its struct type. As @heschik said, Go's code structure is different from other languages, so the document-based symbol hierarchy (DocumentSymbolProvider and its corresponding LSP method) doesn't fit perfectly.
I will transfer this to
Thanks for the feature request, @emil14. For now, our approach to the outline view has been to show symbols in the order that they appear in the file. This would require us to change that behavior. Before moving forward with this, I'd like to hear from other users if they think this would be a net improvement. Notably, we can't show the methods nested within the type declaration because that breaks VS Code's breadcrumbs feature.