company-sourcekit icon indicating copy to clipboard operation
company-sourcekit copied to clipboard

No completion in workspaces

Open sjrmanning opened this issue 6 years ago • 3 comments

Hey,

First of all I really appreciate the work you're doing on this. Would love to be able to use Emacs for all my Swift dev :)

Just had a quick question about compatibility inside workspaces. The autocompletion works for me inside simple projects but as soon as I'm in a project relying on a workspace I get no completion at all, even for built-in types. Just wondering if that's normal or is my configuration broken somewhere?

Cheers!

sjrmanning avatar Jul 04 '17 11:07 sjrmanning

Heya @sjrmanning thanks for the kind words! The answer is that there isn't any official support for workspaces, so it's probably not your configuration :)

I have had reports that using sourcekitten directly works with workspaces with minimal configuration / flag passing - although I'm doubtful, I haven't investigated this any further.

If you're up for it, adding support would involve patching this file in sourcekittendaemon in order to pass the appropriate flags to sourcekitten for workspaces completion!

nathankot avatar Jul 05 '17 00:07 nathankot

I have the same issue, sourcekit-verbose is enabled, but it does not show any error message:

[sourcekit] trying daemon on port: 8081
[sourcekit] making request to http://localhost:8081/complete
[sourcekit] with headers (("X-Offset" . "760") ("X-Path" . "/var/folders/p_/0_0tjh057r3d38tl4s27wc8w0000gn/T/sourcekitten67944HTB"))
[sourcekit] got query response

vitalyster avatar Aug 25 '17 12:08 vitalyster

I commented out preprocessor flags and -c argument (2 lines) and now I got completion in workspace projects to.

https://www.reddit.com/r/emacs/comments/sndriv/i_finally_got_full_autocompetion_in_swift_with/

konrad1977 avatar Feb 08 '22 10:02 konrad1977