Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve document symbol hierarchy to match rust-analyzer layout (#6678)
## Description Changes document symbols to provide a richer code outline view with nested hierarchies and type information, similar to rust-analyzer's implementation. This improves code navigation by showing relationships between elements (e.g., structs with their fields, functions with their variables) and includes type annotations for better understanding. Key improvements: - Nested symbol hierarchy instead of flat list - Type information in symbol details - Function signatures with parameter/return types - Proper parent-child relationships for all code elements - Better outline view organization <img width="287" alt="Screenshot 2024-11-26 at 2 25 17 PM" src="https://github.com/user-attachments/assets/aaf10eaf-90c6-40ee-9bb5-6a9a12901d36"> Note: the performance impact is due to the `get_range_from_span` function which can't avoid calling. 19ms is still reasonable. closes #6100 ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
- Loading branch information