mirror of
https://github.com/qvacua/vimr.git
synced 2024-10-27 18:34:58 +03:00
2623b351c6
- add the NeoVimServer binary - we're on our way to remove the XPC service since only 1-to-1 correspondence possible between an XPC and the main app - NeoVimServer communicates with the main app via two CFMessagePorts - Use enums to distinguish between messages
34 lines
860 B
Objective-C
34 lines
860 B
Objective-C
/**
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
* See LICENSE
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "NeoVimServer.h"
|
|
#import "server_globals.h"
|
|
|
|
|
|
NeoVimServer *_neovim_server;
|
|
|
|
|
|
int main(int argc, const char *argv[]) {
|
|
@autoreleasepool {
|
|
NSArray<NSString *> *arguments = [NSProcessInfo processInfo].arguments;
|
|
NSString *uuid = arguments[1];
|
|
NSString *remoteServerName = arguments[2];
|
|
NSString *localServerName = arguments[3];
|
|
|
|
_neovim_server = [[NeoVimServer alloc] initWithUuid:uuid
|
|
localServerName:localServerName
|
|
remoteServerName:remoteServerName];
|
|
[_neovim_server notifyReadiness];
|
|
|
|
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
|
[runLoop addPort:[NSPort new] forMode:NSRunLoopCommonModes];
|
|
[runLoop run];
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|