Hyperclick inside datatip
It would be nice if:
- [ ] we can click on the types that are shown inside the datatip.
- [ ] have atom-ide-definitions features in the datatip
- [x] the URLs are clickable. -> fixed
@UziTech Can we make the hyperlink working inside the datatips?
hyperclick only observes TextEditors right now. If there was some way to observe when a datatip is created we could observe them too.
It should possible to observe them. If not we can just make them simple hyperlinks so user can click on!
There are three types of datatip: React, HTML, Snippet. All of them are converted to some HTML in the end for rendering. So we can add Hyperclick capability after the final rendering. We can use renderToStaticMarkup to convert it to text if that is more suitable.
https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L148
Instead, we can do this individually for the three types. That might be easier. In that case, we will only need static markup rendering only for the react-dom (which we are already doing it anyway). For HTML and Snippet types, the content is simple.
https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L27 https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L69 https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L103
We might want to fix #60 first though.