def connect(self, nvim, ui, profile=None, notify=False):
"""Connect nvim and the ui.
This will start loops for handling the UI and nvim events while
also synchronizing both.
"""
self._notify = notify
self._error = None
self._nvim = nvim
self._ui = ui
self._profile = profile
self._sem = Semaphore(0)
t = Thread(target=self._nvim_event_loop)
t.daemon = True
t.start()
self._ui_event_loop()
if self._error:
print(self._error)
if self._profile:
print(self._profile)
评论列表
文章目录