Separate codes for invoking sourcekitten from the other part.
Deoplete-swift chooses a completer such as SourceKitten class by calling __choose_completer with the path of temporary file, which contains the contents of the current buffer.
For SourceKittenDaemon support, SourceKittenDaemon counterpart of completer will be required.
It must implement the same interface of SourceKitten's complete method.
I assume that Source manages pairs of the port number of a daemon instance and the path of .xcodeproj and __choose_completer generate SourceKittenDaemon completer by using them.
This pull-request also contains some refactoring and refinement.Please read the commit comments.
Sorry for conflicting with some part of #4.
This pull-request for preparation of SourceKittenDaemon support. The main modifications are as follow:
sourcekitten
from the other part.SourceKitten
class by calling__choose_completer
with the path of temporary file, which contains the contents of the current buffer.For SourceKittenDaemon support,
SourceKittenDaemon
counterpart of completer will be required. It must implement the same interface ofSourceKitten
'scomplete
method.I assume that
Source
manages pairs of the port number of a daemon instance and the path of.xcodeproj
and__choose_completer
generateSourceKittenDaemon
completer by using them.This pull-request also contains some refactoring and refinement.Please read the commit comments. Sorry for conflicting with some part of #4.