Skip to content
Permalink
Browse files

Restructure the project

  • Loading branch information
qvacua committed Dec 3, 2017
1 parent 7b0e563 commit 4ef2fd0f155b178ab503fb63a0c6e4126a03b301
Showing with 2,137 additions and 3,684 deletions.
  1. +1 −1 .gitmodules
  2. +4 −1 Brewfile
  3. +2 −0 Cartfile
  4. +0 −1 Cartfile.private
  5. +5 −0 MsgPackRpc/MsgPackRpc/UnixDomainSocketConnection.m
  6. +1 −1 NvimMsgPack.playground/Contents.swift
  7. +8 −8 NvimMsgPack/NvimMsgPack.xcodeproj/project.pbxproj
  8. +0 −14 NvimMsgPack/NvimMsgPack.xcodeproj/xcshareddata/xcschemes/NvimMsgPack.xcscheme
  9. +15 −15 NvimMsgPack/NvimMsgPack/{Nvim.swift → NvimApi.swift}
  10. +865 −865 NvimMsgPack/NvimMsgPack/{NvimMethods.swift → NvimApiMethods.swift}
  11. 0 {NeoVimServer → NvimView}/NeoVimMsgIds.h
  12. 0 {NeoVimServer → NvimView/NvimServer}/CocoaCategories.h
  13. 0 {NeoVimServer → NvimView/NvimServer}/CocoaCategories.m
  14. 0 {NeoVimServer → NvimView/NvimServer}/DataWrapper.h
  15. 0 {NeoVimServer → NvimView/NvimServer}/DataWrapper.m
  16. 0 {NeoVimServer → NvimView/NvimServer}/Logging.h
  17. 0 {NeoVimServer → NvimView/NvimServer}/NeoVimServer.h
  18. 0 {NeoVimServer → NvimView/NvimServer}/NeoVimServer.m
  19. 0 {NeoVimServer → NvimView/NvimServer}/main.m
  20. 0 {NeoVimServer → NvimView/NvimServer}/server_globals.h
  21. 0 {NeoVimServer → NvimView/NvimServer}/server_ui.m
  22. +714 −0 NvimView/NvimView.xcodeproj/project.pbxproj
  23. +17 −17 ...-Workspace-Demo.xcscheme → NvimView/NvimView.xcodeproj/xcshareddata/xcschemes/NvimServer.xcscheme
  24. +18 −19 .../SwiftNeoVimTests.xcscheme → NvimView/NvimView.xcodeproj/xcshareddata/xcschemes/NvimView.xcscheme
  25. 0 {SwiftNeoVim → NvimView/NvimView}/CellAttributes.swift
  26. 0 {SwiftNeoVim → NvimView/NvimView}/CocoaExtensions.swift
  27. 0 {SwiftNeoVim → NvimView/NvimView}/ColorUtils.swift
  28. 0 {SwiftNeoVim → NvimView/NvimView}/Grid.swift
  29. +4 −6 {SwiftNeoVim → NvimView/NvimView}/Info.plist
  30. 0 {SwiftNeoVim → NvimView/NvimView}/InputTestView.swift
  31. 0 {SwiftNeoVim → NvimView/NvimView}/KeyUtils.swift
  32. 0 {VimR → NvimView/NvimView}/Logger.h
  33. 0 {SwiftNeoVim → NvimView/NvimView}/Logger.swift
  34. 0 {SwiftNeoVim → NvimView/NvimView}/MMCoreTextView.h
  35. 0 {SwiftNeoVim → NvimView/NvimView}/MMCoreTextView.m
  36. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimAgent.h
  37. +1 −1 {SwiftNeoVim → NvimView/NvimView}/NeoVimAgent.m
  38. 0 {NeoVimServer → NvimView/NvimView}/NeoVimBuffer.h
  39. 0 {NeoVimServer → NvimView/NvimView}/NeoVimBuffer.m
  40. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimObjectsExtensions.swift
  41. 0 {NeoVimServer → NvimView/NvimView}/NeoVimTab.h
  42. 0 {NeoVimServer → NvimView/NvimView}/NeoVimTab.m
  43. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimUiBridgeProtocol.h
  44. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimUiBridgeProtocol.m
  45. +9 −9 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+Api.swift
  46. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+Dragging.swift
  47. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+Draw.swift
  48. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+Key.swift
  49. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+MenuItems.swift
  50. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+Mouse.swift
  51. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+Resize.swift
  52. +1 −1 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+TouchBar.swift
  53. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimView+UiBridge.swift
  54. +2 −2 {SwiftNeoVim → NvimView/NvimView}/NeoVimView.swift
  55. 0 {SwiftNeoVim → NvimView/NvimView}/NeoVimViewDelegate.swift
  56. 0 {NeoVimServer → NvimView/NvimView}/NeoVimWindow.h
  57. 0 {NeoVimServer → NvimView/NvimView}/NeoVimWindow.m
  58. +26 −0 NvimView/NvimView/NvimView.h
  59. 0 {SwiftNeoVim → NvimView/NvimView}/TextDrawer.h
  60. 0 {SwiftNeoVim → NvimView/NvimView}/TextDrawer.m
  61. 0 {SwiftNeoVim → NvimView/NvimView}/VIM.LICENSE
  62. 0 { → NvimView}/local-dev.mk
  63. +0 −1 { → NvimView}/local.mk
  64. 0 { → NvimView}/neovim
  65. 0 { → NvimView}/third-party/libintl/include/libintl.h
  66. BIN { → NvimView}/third-party/libintl/lib/libintl.8.dylib
  67. BIN { → NvimView}/third-party/libintl/lib/libintl.a
  68. 0 { → NvimView}/third-party/libintl/lib/libintl.dylib
  69. +8 −21 README.md
  70. +0 −22 SwiftNeoVim/SwiftNeoVim.h
  71. +0 −11 SwiftNeoVimTests/SwiftNeoVimTests.swift
  72. +0 −26 ThemedWindow/AppDelegate.swift
  73. +0 −58 ThemedWindow/Assets.xcassets/AppIcon.appiconset/Contents.json
  74. +0 −417 ThemedWindow/Base.lproj/Main.storyboard
  75. +0 −32 ThemedWindow/Info.plist
  76. +0 −27 ThemedWindow/ViewController.swift
  77. +0 −210 ThemedWindow/WindowController.swift
  78. +0 −108 VimR-Workspace-Demo/AppDelegate.swift
  79. +0 −58 VimR-Workspace-Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
  80. +0 −122 VimR-Workspace-Demo/Base.lproj/MainMenu.xib
  81. +0 −34 VimR-Workspace-Demo/Info.plist
  82. +0 −110 VimR.xcodeproj/xcshareddata/xcschemes/NeoVimServer.xcscheme
  83. +0 −143 VimR.xcodeproj/xcshareddata/xcschemes/SwiftNeoVim.xcscheme
  84. +0 −159 VimR.xcodeproj/xcshareddata/xcschemes/VimR.xcscheme
  85. +6 −3 VimR.xcworkspace/contents.xcworkspacedata
  86. 0 { → VimR}/MacNeovim/AppDelegate.swift
  87. 0 { → VimR}/MacNeovim/Application.swift
  88. 0 { → VimR}/MacNeovim/Assets.xcassets/AppIcon.appiconset/Contents.json
  89. 0 { → VimR}/MacNeovim/Base.lproj/MainMenu.xib
  90. 0 { → VimR}/MacNeovim/Base.lproj/NeoVimWindow.xib
  91. 0 { → VimR}/MacNeovim/Info.plist
  92. 0 { → VimR}/MacNeovim/NeoVimWindow.swift
  93. +107 −1,099 { → VimR}/VimR.xcodeproj/project.pbxproj
  94. 0 { → VimR}/VimR.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  95. 0 { → VimR}/VimR.xcodeproj/xcshareddata/xcschemes/MacNeovim.xcscheme
  96. +22 −12 ...eddata/xcschemes/ThemedWindow.xcscheme → VimR/VimR.xcodeproj/xcshareddata/xcschemes/VimR.xcscheme
  97. 0 { → VimR}/VimR.xcodeproj/xcshareddata/xcschemes/VimRTests.xcscheme
  98. 0 VimR/{ → VimR}/AdvancedPrefReducer.swift
  99. 0 VimR/{ → VimR}/AdvencedPref.swift
  100. 0 VimR/{ → VimR}/AppDelegate.swift
  101. 0 VimR/{ → VimR}/AppDelegateReducer.swift
  102. 0 VimR/{ → VimR}/AppKitCommons.swift
  103. 0 VimR/{ → VimR}/AppearancePref.swift
  104. 0 VimR/{ → VimR}/AppearancePrefReducer.swift
  105. 0 VimR/{ → VimR}/Application.swift
  106. 0 VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/Contents.json
  107. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_128x128.png
  108. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png
  109. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_16x16.png
  110. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png
  111. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_256x256.png
  112. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png
  113. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_32x32.png
  114. BIN VimR/{ → VimR}/Assets.xcassets/AppIcon.appiconset/icon_512x512.png
  115. 0 VimR/{ → VimR}/Base.lproj/Credits.rtf
  116. 0 VimR/{ → VimR}/Base.lproj/FileBrowserMenu.xib
  117. 0 VimR/{ → VimR}/Base.lproj/MainMenu.xib
  118. 0 VimR/{ → VimR}/Base.lproj/MainWindow.xib
  119. 0 VimR/{ → VimR}/Base.lproj/OpenQuicklyWindow.xib
  120. 0 VimR/{ → VimR}/Base.lproj/PrefWindow.xib
  121. +1 −1 VimR/{ → VimR}/Bridge.h
  122. 0 VimR/{ → VimR}/Context.swift
  123. 0 VimR/{ → VimR}/Debouncer.swift
  124. 0 VimR/{ → VimR}/FileBrowser.swift
  125. 0 VimR/{ → VimR}/FileBrowserReducer.swift
  126. 0 VimR/{ → VimR}/FileItem.swift
  127. 0 VimR/{ → VimR}/FileItemIgnorePattern.swift
  128. 0 VimR/{ → VimR}/FileItemUtils.swift
  129. 0 VimR/{ → VimR}/FileMonitor.swift
  130. 0 VimR/{ → VimR}/FileMonitorReducer.swift
  131. +1 −1 VimR/{ → VimR}/FileOutlineView.swift
  132. 0 VimR/{ → VimR}/FileUtils.swift
  133. 0 VimR/{ → VimR}/FoundationCommons.swift
  134. 0 VimR/{ → VimR}/GeneralPref.swift
  135. 0 VimR/{ → VimR}/GeneralPrefReducer.swift
  136. 0 VimR/{ → VimR}/HtmlPreviewTool.swift
  137. 0 VimR/{ → VimR}/HtmlPreviewToolReducer.swift
  138. 0 VimR/{ → VimR}/HttpServerService.swift
  139. 0 VimR/{ → VimR}/ImageAndTextTableCell.swift
  140. 0 VimR/{ → VimR}/Info.plist
  141. +252 −0 VimR/VimR/Logger.swift
  142. 0 VimR/{ → VimR}/MainWindow+Actions.swift
  143. 0 VimR/{ → VimR}/MainWindow+CustomTitle.swift
  144. 0 VimR/{ → VimR}/MainWindow+Delegates.swift
  145. +1 −1 VimR/{ → VimR}/MainWindow.swift
  146. 0 VimR/{ → VimR}/MainWindowReducer.swift
  147. 0 VimR/{ → VimR}/Matcher.swift
  148. 0 VimR/{ → VimR}/NetUtils.h
  149. 0 VimR/{ → VimR}/NetUtils.m
  150. 0 VimR/{ → VimR}/OpenQuicklyFileViewRow.swift
  151. 0 VimR/{ → VimR}/OpenQuicklyFilterOperation.swift
  152. 0 VimR/{ → VimR}/OpenQuicklyReducer.swift
  153. 0 VimR/{ → VimR}/OpenQuicklyWindow.swift
  154. +1 −1 VimR/{ → VimR}/OpenedFileList.swift
  155. 0 VimR/{ → VimR}/OpenedFileListReducer.swift
  156. 0 VimR/{ → VimR}/Pref128ToCurrentConverter.swift
  157. 0 VimR/{ → VimR}/PrefPane.swift
  158. 0 VimR/{ → VimR}/PrefService.swift
  159. +1 −1 VimR/{ → VimR}/PrefUtils.swift
  160. 0 VimR/{ → VimR}/PrefWindow.swift
  161. 0 VimR/{ → VimR}/PrefWindowReducer.swift
  162. 0 VimR/{ → VimR}/PreviewReducer.swift
  163. 0 VimR/{ → VimR}/PreviewService.swift
  164. 0 VimR/{ → VimR}/PreviewTool.swift
  165. 0 VimR/{ → VimR}/PreviewToolReducer.swift
  166. 0 VimR/{ → VimR}/PreviewUtils.swift
  167. 0 VimR/{ → VimR}/RxSwiftCommons.swift
  168. 0 VimR/{ → VimR}/ScoredFileItem.swift
  169. 0 VimR/{ → VimR}/Scorer.swift
  170. 0 VimR/{ → VimR}/SerializableStates.swift
  171. 0 VimR/{ → VimR}/States.swift
  172. 0 VimR/{ → VimR}/SwiftCommons.swift
  173. +1 −1 VimR/{ → VimR}/Theme.swift
  174. +1 −1 VimR/{ → VimR}/ThemedTableSubviews.swift
  175. 0 VimR/{ → VimR}/ToolsPref.swift
  176. 0 VimR/{ → VimR}/ToolsPrefReducer.swift
  177. 0 VimR/{ → VimR}/Types.swift
  178. 0 VimR/{ → VimR}/UiRoot.swift
  179. 0 VimR/{ → VimR}/UiRootReducer.swift
  180. 0 VimR/{ → VimR}/Workspace/InnterToolBar.swift
  181. 0 VimR/{ → VimR}/Workspace/ProxyWorkspaceBar.swift
  182. 0 VimR/{ → VimR}/Workspace/Workspace.swift
  183. 0 VimR/{ → VimR}/Workspace/WorkspaceBar.swift
  184. 0 VimR/{ → VimR}/Workspace/WorkspaceTool.swift
  185. 0 VimR/{ → VimR}/Workspace/WorkspaceToolButton.swift
  186. 0 VimR/{ → VimR}/markdown/github-markdown.css
  187. 0 VimR/{ → VimR}/markdown/template.html
  188. 0 VimR/{ → VimR}/preview/base.css
  189. 0 VimR/{ → VimR}/preview/empty.html
  190. 0 VimR/{ → VimR}/preview/error.html
  191. 0 VimR/{ → VimR}/preview/save-first.html
  192. 0 VimR/{ → VimR}/preview/select-first.html
  193. 0 VimR/{ → VimR}/sparkle_pub.pem
  194. 0 VimR/{ → VimR}/vimr
  195. 0 { → VimR}/VimRTests/ArrayCommonsTest.swift
  196. 0 { → VimR}/VimRTests/DictionaryCommonsTest.swift
  197. 0 { → VimR}/VimRTests/FileItemIgnorePatternTest.swift
  198. 0 { → VimR}/VimRTests/FileUtilsTest.swift
  199. 0 {SwiftNeoVimTests → VimR/VimRTests}/Info.plist
  200. 0 { → VimR}/VimRTests/MatcherTests.swift
  201. 0 { → VimR}/VimRTests/PrefUtilsTest.swift
  202. 0 { → VimR}/VimRTests/RxSwiftCommonsTest.swift
  203. 0 { → VimR}/VimRTests/ScorerTest.swift
  204. 0 { → VimR}/VimRTests/StringCommonsTest.swift
  205. 0 { → VimR}/VimRTests/UrlCommonsTest.swift
  206. 0 { → VimR}/VimRTests/resources/FileUtilsTest/a1/a1-file1
  207. 0 { → VimR}/VimRTests/resources/FileUtilsTest/a1/a2/a1-a2-file1
  208. 0 { → VimR}/VimRTests/resources/FileUtilsTest/b1/b1-file1
  209. 0 { → VimR}/VimRTests/resources/UrlCommonsTest/.dot-hidden-file
  210. 0 { → VimR}/VimRTests/resources/UrlCommonsTest/dummy.rtfd/TXT.rtf
  211. +0 −24 VimRTests/Info.plist
  212. +3 −0 bin/build.sh
  213. +4 −0 bin/build_deps.sh
  214. +7 −2 bin/build_libnvim.sh
  215. +4 −5 bin/build_travis.sh
  216. +5 −5 bin/build_vimr.sh
  217. +2 −2 bin/clean_old_builds.sh
  218. +2 −2 bin/commit_and_push_tags.sh
  219. +4 −3 bin/generate_source.py
  220. +11 −0 bin/set_new_versions.sh
@@ -1,3 +1,3 @@
[submodule "neovim"]
path = neovim
path = NvimView/neovim
url = https://github.com/qvacua/neovim.git
@@ -1,5 +1,8 @@
brew 'carthage'
brew 'gnu-sed'
brew 'libtool'
brew 'automake'
brew 'cmake'
brew 'pkg-config'
brew 'gettext'
brew 'ninja'
brew 'gnu-sed'
@@ -8,3 +8,5 @@ github "sindresorhus/github-markdown-css" == 2.9.0
github "httpswift/swifter" == 1.3.3
github "a2/MessagePack.swift" == 3.0.0
github "antitypical/Result" == 3.2.4

github "Quick/Nimble" == 7.0.1

This file was deleted.

@@ -140,6 +140,11 @@ - (void)threadMain {
}

- (CFSocketError)writeData:(NSData *)data {
if (!CFSocketIsValid(_socket)) {
NSLog(@"Socket invalid, but trying to send %@", data);
return kCFSocketError;
}

return CFSocketSendData(_socket, NULL, (__bridge CFDataRef) data, _timeout);
}

@@ -5,7 +5,7 @@ import NvimMsgPack

// Start nvim as follows:
// $ NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim $SOME_FILES
guard let nvim = Nvim(at: "/tmp/nvim.sock") else {
guard let nvim = NvimApi(at: "/tmp/nvim.sock") else {
preconditionFailure("Could not connect to nvim")
}

@@ -9,8 +9,8 @@
/* Begin PBXBuildFile section */
4B9E33711FCB475600E0C4BC /* NvimMsgPack.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B9E336F1FCB475600E0C4BC /* NvimMsgPack.h */; settings = {ATTRIBUTES = (Public, ); }; };
4B9E33781FCB476D00E0C4BC /* MsgPackRpc.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9E33791FCB476D00E0C4BC /* MsgPackRpc.framework */; };
4B9E337C1FCB47B300E0C4BC /* Nvim.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9E337A1FCB47B300E0C4BC /* Nvim.swift */; };
4B9E337D1FCB47B300E0C4BC /* NvimMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9E337B1FCB47B300E0C4BC /* NvimMethods.swift */; };
4B9E337C1FCB47B300E0C4BC /* NvimApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9E337A1FCB47B300E0C4BC /* NvimApi.swift */; };
4B9E337D1FCB47B300E0C4BC /* NvimApiMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9E337B1FCB47B300E0C4BC /* NvimApiMethods.swift */; };
4B9E33831FCB47F900E0C4BC /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4B9E337F1FCB47F900E0C4BC /* Info.plist */; };
4B9E33841FCB47F900E0C4BC /* Result.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B9E33801FCB47F900E0C4BC /* Result.h */; };
4B9E33851FCB47F900E0C4BC /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9E33811FCB47F900E0C4BC /* Result.swift */; };
@@ -22,8 +22,8 @@
4B9E336F1FCB475600E0C4BC /* NvimMsgPack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NvimMsgPack.h; sourceTree = "<group>"; };
4B9E33701FCB475600E0C4BC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4B9E33791FCB476D00E0C4BC /* MsgPackRpc.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MsgPackRpc.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4B9E337A1FCB47B300E0C4BC /* Nvim.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Nvim.swift; sourceTree = "<group>"; };
4B9E337B1FCB47B300E0C4BC /* NvimMethods.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimMethods.swift; sourceTree = "<group>"; };
4B9E337A1FCB47B300E0C4BC /* NvimApi.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimApi.swift; sourceTree = "<group>"; };
4B9E337B1FCB47B300E0C4BC /* NvimApiMethods.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimApiMethods.swift; sourceTree = "<group>"; };
4B9E337F1FCB47F900E0C4BC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4B9E33801FCB47F900E0C4BC /* Result.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Result.h; sourceTree = "<group>"; };
4B9E33811FCB47F900E0C4BC /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = "<group>"; };
@@ -63,8 +63,8 @@
isa = PBXGroup;
children = (
4B9E336F1FCB475600E0C4BC /* NvimMsgPack.h */,
4B9E337A1FCB47B300E0C4BC /* Nvim.swift */,
4B9E337B1FCB47B300E0C4BC /* NvimMethods.swift */,
4B9E337A1FCB47B300E0C4BC /* NvimApi.swift */,
4B9E337B1FCB47B300E0C4BC /* NvimApiMethods.swift */,
4B9E337E1FCB47F900E0C4BC /* Result */,
4B9E33701FCB475600E0C4BC /* Info.plist */,
);
@@ -177,8 +177,8 @@
files = (
4B9E33861FCB47F900E0C4BC /* ResultProtocol.swift in Sources */,
4B9E33851FCB47F900E0C4BC /* Result.swift in Sources */,
4B9E337D1FCB47B300E0C4BC /* NvimMethods.swift in Sources */,
4B9E337C1FCB47B300E0C4BC /* Nvim.swift in Sources */,
4B9E337D1FCB47B300E0C4BC /* NvimApiMethods.swift in Sources */,
4B9E337C1FCB47B300E0C4BC /* NvimApi.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -6,20 +6,6 @@
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4B9E333E1FCB457800E0C4BC"
BuildableName = "MsgPackRpc.framework"
BlueprintName = "MsgPackRpc"
ReferencedContainer = "container:../MsgPackRpc/MsgPackRpc.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
@@ -6,7 +6,7 @@
import Foundation
import MsgPackRpc

public class Nvim {
public class NvimApi {

public struct Buffer: Equatable {

@@ -66,7 +66,7 @@ public class Nvim {
self.message = message
}

init(_ value: Nvim.Value?) {
init(_ value: NvimApi.Value?) {
if let rawValue = value?.unsignedIntegerValue {
self.type = ErrorType(rawValue: Int(rawValue)) ?? .unknown
} else {
@@ -79,9 +79,9 @@ public class Nvim {

public typealias Value = MsgPackRpc.Value

public typealias Response<R> = Result<R, Nvim.Error>
public typealias Response<R> = Result<R, NvimApi.Error>

public var notificationCallback: ((MsgPackRpc.MessageType, String, [Nvim.Value]) -> Void)? {
public var notificationCallback: ((MsgPackRpc.MessageType, String, [NvimApi.Value]) -> Void)? {
get {
return self.session.notificationCallback
}
@@ -91,7 +91,7 @@ public class Nvim {
}
}

public var unknownMessageCallback: (([Nvim.Value]) -> Void)? {
public var unknownMessageCallback: (([NvimApi.Value]) -> Void)? {
get {
return self.session.unknownMessageCallback
}
@@ -101,7 +101,7 @@ public class Nvim {
}
}

public var errorCallback: ((Nvim.Value) -> Void)? {
public var errorCallback: ((NvimApi.Value) -> Void)? {
get {
return self.session.errorCallback
}
@@ -113,7 +113,7 @@ public class Nvim {

public class Session {

var notificationCallback: ((MsgPackRpc.MessageType, String, [Nvim.Value]) -> Void)? {
var notificationCallback: ((MsgPackRpc.MessageType, String, [NvimApi.Value]) -> Void)? {
get {
return self.connection.notificationCallback
}
@@ -123,7 +123,7 @@ public class Nvim {
}
}

var unknownMessageCallback: (([Nvim.Value]) -> Void)? {
var unknownMessageCallback: (([NvimApi.Value]) -> Void)? {
get {
return self.connection.unknownMessageCallback
}
@@ -133,7 +133,7 @@ public class Nvim {
}
}

var errorCallback: ((Nvim.Value) -> Void)? {
var errorCallback: ((NvimApi.Value) -> Void)? {
get {
return self.connection.errorCallback
}
@@ -161,7 +161,7 @@ public class Nvim {

public func rpc(method: String,
params: [MsgPackRpc.Value],
expectsReturnValue: Bool) -> Result<MsgPackRpc.Value, Nvim.Error> {
expectsReturnValue: Bool) -> Result<MsgPackRpc.Value, NvimApi.Error> {

let msgid = locked(with: self.nextMsgidLock) { () -> UInt32 in
let msgid = self.nextMsgid
@@ -176,7 +176,7 @@ public class Nvim {
expectsReturnValue: expectsReturnValue)

guard response.error.isNil else {
return .failure(Nvim.Error(response.error))
return .failure(NvimApi.Error(response.error))
}

return .success(response.result)
@@ -215,17 +215,17 @@ public class Nvim {
}

@discardableResult
public func checkBlocked<T>(_ fn: () -> Nvim.Response<T>) -> Nvim.Response<T> {
public func checkBlocked<T>(_ fn: () -> NvimApi.Response<T>) -> NvimApi.Response<T> {
if self.getMode().value?.dictionaryValue?[.string("blocked")] == .bool(true) {
return Nvim.Response.failure(Nvim.Error(type: .blocked, message: "Nvim is currently blocked."))
return NvimApi.Response.failure(NvimApi.Error(type: .blocked, message: "Nvim is currently blocked."))
}

return fn()
}

public func rpc(method: String,
params: [Nvim.Value],
expectsReturnValue: Bool = true) -> Nvim.Response<Nvim.Value> {
params: [NvimApi.Value],
expectsReturnValue: Bool = true) -> NvimApi.Response<NvimApi.Value> {

return self.session.rpc(method: method, params: params, expectsReturnValue: expectsReturnValue)
}

0 comments on commit 4ef2fd0

Please sign in to comment.
You can’t perform that action at this time.