AnarchyTools / SublimeAnarchy

SourceKit can crash more than just Xcode
4 stars 0 forks source link

ObjC documentation #11

Open drewcrawford opened 8 years ago

drewcrawford commented 8 years ago

I'm not currently pulling in documentation for ObjC-based frameworks (including, e.g. DarwinFoundation).

I studied this briefly, it doesn't seem like SK is equipped to pull them in at present.

The most probable path forward here is to root around in ~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.OSX.docset/Contents/Resources/Tokens/Swift Inside there, the XML files look like:

<?xml version="1.0" encoding="utf-8"?><Enumeration AppleRefID="//apple_ref/swift/enum/s:OSs19PlaygroundQuickLook">

That s:OSs19PlaygroundQuickLook is a key.usr. So it becomes a problem of figuring out (or indexing) what file contains that string and then piping in the XML documentation.

I don't actually plan to implement this, since I don't need ObjC support that badly, but I'm writing this down in case somebody does.

drewcrawford commented 8 years ago

Reverse-engineering xcode confirms it calls cursorInfo and then finds the documentation some non-SK way.