diff --git a/.travis.yml b/.travis.yml index 398323d..29f8c0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ env: matrix: - CI_TARGET=pytests - CI_TARGET=vim - - CI_TARGET=neovim VROOM_ARGS=--neovim + - CI_TARGET=neovim VROOM_ARGS="--neovim --skip messages.vroom directives.vroom system.vroom" matrix: fast_finish: true allow_failures: diff --git a/scripts/shell.vroomfaker b/scripts/shell.vroomfaker index 98b10d0..ffec39e 100755 --- a/scripts/shell.vroomfaker +++ b/scripts/shell.vroomfaker @@ -40,12 +40,8 @@ try: with open(controlfile, 'rb') as f: controls = pickle.load(f) - if os.getenv('VROOM_NEOVIM'): - # Neovim does not wrap commands, just pass then unchanged - command, rebuild = (sys.argv[2], lambda cmd: cmd) - else: - # Parse the user command out from vim's gibberish. - command, rebuild = vroom.vim.SplitCommand(sys.argv[2]) + # Parse the user command out from vim's gibberish. + command, rebuild = vroom.vim.SplitCommand(sys.argv[2]) logs.append(vroom.test.Received(command)) handled = False diff --git a/vroom/neovim_mod.py b/vroom/neovim_mod.py index 1fc2f45..6ba4173 100644 --- a/vroom/neovim_mod.py +++ b/vroom/neovim_mod.py @@ -17,8 +17,6 @@ def __init__(self, args, env, writer): '-c', 'set shell=' + args.shell, '-c', 'source %s' % CONFIGFILE] env['NVIM_LISTEN_ADDRESS'] = args.servername - # Set environment for shell.vroomfaker to know Neovim is being used - env['VROOM_NEOVIM'] = '1' self.env = env self._cache = {} @@ -37,11 +35,7 @@ def Start(self): while not os.path.exists(self.args.servername) \ and time.time() - start_time < 5: time.sleep(0.01) - session = neovim.socket_session(self.args.servername) - # We keep 2 instances of Nvim, with and without automatic - # Unicode decoding, use the first if you need Unicode - self.nvim = neovim.Nvim.from_session(session) - self.nvim_unicode = self.nvim.with_hook(neovim.DecodeHook()) + self.nvim = neovim.attach('socket', path=self.args.servername) def Communicate(self, command, extra_delay=0): """Sends a command to Neovim. @@ -68,7 +62,7 @@ def Ask(self, expression): Returns: Return value from vim. """ - return self.nvim_unicode.eval(expression) + return self.nvim.eval(expression) def GetBufferLines(self, number): """Gets the lines in the requested buffer. @@ -82,9 +76,9 @@ def GetBufferLines(self, number): """ if number not in self._cache: if number is None: - buf = self.nvim_unicode.current.buffer + buf = self.nvim.current.buffer else: - for b in self.nvim_unicode.buffers: + for b in self.nvim.buffers: if b.number == number: buf = b break