-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add types to symbol outline #398
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Jonathan Immanuel Brachthäuser <jonathan@b-studios.de>
val ScopesForFile = Annotation[kiama.util.Source, List[symbols.scopes.Scope]]( | ||
"ScopesForFile", | ||
"all scopes for file" | ||
) |
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 might lead to a lot of allocation, but this is a general problem.
Hey @marvinborner what are the next steps here? |
I'm really not sure. As discussed, annotating the scopes adds a lot of allocations. I think we need to find a better (and cached) solution, and also cache other stages first. Otherwise, merging (something like) this will decrease LSP's performance a lot. (or we just merge the basic implementation before scope annotations, as an initial solution) |
ee9d209
to
58c8510
Compare
Closes #396. I also added collapsible items for imports and namespaces.
I'm not sure how to get the types of sub-level symbols yet, so I just put a '?' when the type is not available. We also need to add some kind of caching so the outline doesn't flicker when the file can't be processed (ie. while actively typing).