ballerina-lang
ballerina-lang copied to clipboard
Add BBE and API references to hover documentation
trafficstars
Description:
When using vscode with HTML and JavaScript, when we hover over html tags, it shows the MDN Reference link in the hover documentation.

Something similar will be really useful to people who are adopting Ballerina. For example:
- When hovering over the
servicekeyword, give a brief intro on what is a service and example links to relevant BBEs. - When hovering over
from,whereand similar query expression related clauses, we can show an intro on query expressions and link to relevant BBEs. - When hovering over an
http:Listener, show link to API docs or relevant BBEs. Linking API docs may be done at listener's documentation level, but linking BBEs can be done at LS side. - When hovering over
clients, show a brief intro and show relevant BBEs
Here's an example how such hover documentation will look and will be helpful:

Describe your problem(s) See description above
Describe your solution(s)
- First, need to index BBEs against keywords and relevant listeners/clients.
- Next, LS should fetch matching BBE links for the current node being hovered.
Note that the VSCode plugin already has a command to view BBEs. We may be able to use some of it's internal functionalities.