@abynim, @kevgski, can we riff on this a little bit and figure out how to get information for the highlighted nested symbol within a symbol instance? If you select a symbol instance which contains nested symbols, you can move your mouse around and nested symbols you hover over will become highlighted. "highlightedItem" returns data if I hover the symbol instance itself, but doesn't return data if I hover highlight something within the selected symbol instance.
Alternatively, I would be happy if I could figure out how to get the information from the layer list, since you can make a selection within an expanded symbol instance there. Can't seem to figure that out either though.
Edit 1: Looking at the error that is returned, it looks like I might need to explore MSOverrideRepresentation instead?
Error: An Obj-C exception occurred.
at [native code] (/)
at a (/Applications/Sketch.app/Contents/Resources/SketchAPI.js:1:147266)
at onRun (/Users/jbur0001/Library/Application Support/com.bohemiancoding.sketch3/Plugins/highlight-test.sketchplugin/Contents/Sketch/script.cocoascript:17:18)
nativeException: -[MSOverrideRepresentation copyWithZone:]: unrecognized selector sent to instance 0x600017c8f980
Edit 2: FYI... in order to test this, I had to create a plugin and map a keyboard shortcut as you cannot hover/highlight something with the Run Script panel open. I settled on 'cmd shift control h'... 'option' might not be reliable as it seems to disable the hover highlight when pressed.