terhechte / SourceKittenDaemon

Swift Auto Completions for any Text Editor
MIT License
529 stars 37 forks source link

SKD requires xcodeproj, but Swift can be used outside of Xcode #70

Closed troyibm closed 6 years ago

troyibm commented 7 years ago

Swift can be used for sever side coding now (via openwhisk for instance). I'd like to use Atom and the swift plugins (language-swift, swift-debugger, autocomplete-swift) for this instead of using Xcode but I see from the code (haven't really tried this - still just investigating) that without a .xcodeproj file, then SourceKittenDaemon won't start.

How can I get autocomplete into this example: https://medium.com/@Aciid/hacking-atom-to-create-a-swift-ide-that-runs-on-linux-and-mac-c7d9520a0fac ? Thanks.

johndpope commented 7 years ago

fyi - https://github.com/RLovelett/langserver-swift

felix91gr commented 7 years ago

Alternatively, you can actually generate the XcodeProj file natively from the Swift Package Manager :)

troyibm commented 7 years ago

@felix91gr if an xcodeproj file is created but the editor being used isn't Xcode, will it be updated with an editor like Atom as more swift code is written??

terhechte commented 7 years ago

@troyibm If you add new Swift files to the project, you have to re-generate the Xcode file with SPM.

troyibm commented 7 years ago

what happens if you modify a Swift file (like add a function or something), will auto-complete show that function without re-generating the xcodeproj file?

felix91gr commented 6 years ago

It should, I'm almost certain. Did it work for you? Sorry for the late answer. I'm doing cleanup and I just realized that this was left unsolved.

troyibm commented 6 years ago

Thanks for the late answer. It's a timely answer. I'm starting a swift-as-the-server project this week. I didn't try it, but likely will soon. Thanks. You can close and I'll reopen if there is a problem.

felix91gr commented 6 years ago

Awesome :)

I hope it works OK!