import neovim import check_lldb lldb_success = check_lldb.probe() from .controller import Controller, EventLoopError from .vim_x import VimX @neovim.plugin class Middleman(object): def __init__(self, vim): import logging self.logger = logging.getLogger(__name__) self.logger.setLevel(logging.INFO) if not lldb_success: self.logger.critical('LLDB could not be imported!') # ImportError will be raised in Controller init below. self.ctrl = Controller(VimX(vim)) self.ctrl.start() if self.ctrl.vimx._vim_test: print "Note: `:LL-` commands are not bound with this test instance" else: vim.command('call lldb#remote#init(%d)' % vim.channel_id) @neovim.command('LLsession', nargs='+', complete='customlist,lldb#session#complete') def _session(self, args): self.ctrl.safe_call(self.ctrl.session.handle, args) @neovim.rpc_export('mode') def _mode(self, mode): self.ctrl.safe_call(self.ctrl.session.mode_setup, [mode])
import logging import neovim import check_lldb if not check_lldb.probe(): logging.getLogger(__name__).critical('LLDB could not be imported!') # ImportError will be raised in Controller import below. from .controller import Controller, EventLoopError from .vim_x import VimX @neovim.plugin class Middleman(object): def __init__(self, vim): self.logger = logging.getLogger(__name__) self.logger.setLevel(logging.INFO) self.ctrl = Controller(VimX(vim)) self.ctrl.start() if self.ctrl.vimx._vim_test: print "Note: `:LL-` commands are not bound with this test instance" else: vim.command('call lldb#remote#init(%d)' % vim.channel_id) # The only interface that is predefined in the remote plugin manifest file. # The first execution of `:LLsession` initializes the remote part of the plugin. @neovim.command('LLsession', nargs='+', complete='customlist,lldb#session#complete') def _session(self, args): self.ctrl.safe_call(self.ctrl.session.handle, args) @neovim.rpc_export('mode') def _mode(self, mode):
import logging import neovim import check_lldb if not check_lldb.probe(): logging.getLogger(__name__).critical('LLDB could not be imported!') # ImportError will be raised in Controller import below. from .controller import Controller, EventLoopError from .vim_x import VimX @neovim.plugin class Middleman(object): def __init__(self, vim): self.logger = logging.getLogger(__name__) self.logger.setLevel(logging.INFO) self.ctrl = Controller(VimX(vim)) self.ctrl.start() if self.ctrl.vimx._vim_test: print "Note: `:LL-` commands are not bound with this test instance" else: vim.command('call lldb#remote#init(%d)' % vim.channel_id) # The only interface that is predefined in the remote plugin manifest file. # The first execution of `:LLsession` initializes the remote part of the plugin. @neovim.command('LLsession', nargs='+', complete='customlist,lldb#session#complete') def _session(self, args): self.ctrl.safe_call(self.ctrl.session.handle, args)
import neovim import check_lldb lldb_success = check_lldb.probe() from .controller import Controller, EventLoopError from .vim_x import VimX @neovim.plugin class Middleman(object): def __init__(self, vim): import logging self.logger = logging.getLogger(__name__) self.logger.setLevel(logging.INFO) if not lldb_success: self.logger.critical('LLDB could not be imported!') # ImportError will be raised in Controller init below. self.ctrl = Controller(VimX(vim)) self.ctrl.start() if self.ctrl.vimx._vim_test: print "Note: `:LL-` commands are not bound with this test instance" else: vim.command('call lldb#remote#init(%d)' % vim.channel_id) @neovim.command('LLsession', nargs='+', complete='customlist,lldb#session#complete') def _session(self, args): self.ctrl.safe_call(self.ctrl.session.handle, args)