-
Notifications
You must be signed in to change notification settings - Fork 123
Description
I'm struggling a little with the JSONWorkerContribution
interface to provide smart hover.
From what I can read in jsonHover, it looks like a JSONWorkerContribution.getInfoContribution
should return undefined when there's nothing to show (which prevents the use of async function() since it would return Promise).
I'm struggling with two things with this API design:
getInfoContribution(uri, location)
does not let me discriminate on if the location is to a property or value node- If
getInfoContribution(uri, location)
returns something, hover info from the schema is not shown (it's one or the other)
I kind of would like to be able to show both if both have something.
For instance, at Shopify we have those large translation files. It feels like it would make sense to have a getInfoContribution that prints out the translation key of the thing under the cursor ('deep.path.to.key'
), but this should only happen on the key and if there's something special from the schema, then I'd probably want that as well.
e.g. keys that end in _html
have a special meaning and there's docs associated with them.