Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Add symbol end_position using end_location #114

Merged
merged 4 commits into from
May 8, 2018

Conversation

faustinoaq
Copy link
Member

I just found this enhancement during development of rename feature

This will allow us to show code outline properly 🎉

screenshot_20180506_163009

@faustinoaq
Copy link
Member Author

screenshot_20180506_163506

This is awesome ❤️ almost API search with code outline ✨

range = Range.new(position, position)
location = Location.new(@document_uri, range)
end_location = node.end_location
if end_location
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do if end_location = node.end_location, I think it shows better that end_location won't be used outside the if

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@faustinoaq faustinoaq requested a review from bew May 6, 2018 23:11

range = Range.new(position, end_position)
location = Location.new(@document_uri, range)
@symbols << SymbolInformation.new(name, kind, location, @container.join("::"))
true
Copy link
Contributor

@bew bew May 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: true is useless here, and same for return true unless location at the beginning of that method.

@faustinoaq faustinoaq merged commit 5e5666c into master May 8, 2018
@faustinoaq faustinoaq deleted the fa/add-symbol-end_location branch May 8, 2018 11:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants