def __init__(self, vim): self.name = 'core' self._vim = vim self._runtimepath = '' self._custom = [] self._loaded_paths = set() self._prev_merged_results = {} self._prev_pos = [] self._parents = [] self._parent_count = 0 self._max_parents = max([1, self._vim.vars['deoplete#max_processes']]) # Init context context = self._vim.call('deoplete#init#_context', 'Init', []) context['rpc'] = 'deoplete_on_event' for n in range(0, self._max_parents): self._parents.append(Parent(vim, context)) # Enable logging before "Init" for more information, and e.g. # deoplete-jedi picks up the log filename from deoplete's handler in # its on_init. if self._vim.vars['deoplete#_logging']: self.enable_logging() # on_init() call self.on_event(context) self._vim.vars['deoplete#_initialized'] = True if hasattr(self._vim, 'channel_id'): self._vim.vars['deoplete#_channel_id'] = self._vim.channel_id
def _add_parent(self, context): parent = Parent(self._vim, context) if self._vim.vars['deoplete#_logging']: parent.enable_logging() self._parents.append(parent)