-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Document Symbols support #652
Conversation
72cb278
to
f406f67
Compare
Typed the following: defprotocol Inspect do
end ...and got
|
Added document symbols, which supports the following symbols: * Modules * Functions, both private and public * Typespecs * Module Attributes * ExUnit describe / setup / tests Fixes #382
For document symbols, we need to provide support for block ranges for things like modules, functions and tests, so that the editor can understand if it's inside the given symbol. The LSP also would like to have selection ranges, which are more specific, and would, say highlight the function definition.
Sourceror had a bug calculating end lines, which was causing responses not to be emitted, but only when unicode was present. It was emitting the ending several characters beyond where the `end` keyword was, and this would fail during conversion as being out of bounds.
f406f67
to
9ca3dd5
Compare
@scohen can i please get a review on this? |
Just got back from the countryside yesterday and experienced it for a couple of days,today I'll take a look. |
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.
Another aspect that I think could enhance user experience is, do we really need to display the full name of struct
? It seems redundant with modules, and I think using just the last name of the module is sufficient.
Lastly, why doesn't defimpl
have symbols? like: apps/protocol/lib/lexical/protocol/convertibles/lexical.document.edit.ex
It's also a module.
Because we don't have a defimpl extractor. Nor do we have a defprotocol extractor. Once those are added, we'll get symbols automatically. |
@scottming this is holding up other stuff. I'm merging. |
Added document symbols, which supports the following symbols:
Fixes #382