neovim.api.nvim.NvimError: b'Index out of bounds'
See original GitHub issueI don’t know if the error is for deoplete or deoplete-ternjs
[deoplete] Traceback (most recent call last):
[deoplete] Traceback (most recent call last):
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 100, in gather_results
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 100, in gather_results
[deoplete] ctx['candidates'] = source.gather_candidates(ctx)
[deoplete] ctx['candidates'] = source.gather_candidates(ctx)
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 351, in gather_candidates
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 351, in gather_candidates
[deoplete] result = self.completation(pos) or []
[deoplete] result = self.completation(pos) or []
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 307, in completation
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 307, in completation
[deoplete] data = self.run_command(command, pos)
[deoplete] data = self.run_command(command, pos)
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 192, in run_command
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 192, in run_command
[deoplete] f = self.buffer_fragment()
[deoplete] f = self.buffer_fragment()
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 274, in buffer_fragment
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 274, in buffer_fragment
[deoplete] "text": self.buffer_slice(buffer, start, end),
[deoplete] "text": self.buffer_slice(buffer, start, end),
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 242, in buffer_slice
[deoplete] File "/Users/daniele/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 242, in buffer_slice
[deoplete] text += buf[pos] + "\n"
[deoplete] text += buf[pos] + "\n"
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/api/buffer.py", line 45, in __getitem__
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/api/buffer.py", line 45, in __getitem__
[deoplete] return self.request('nvim_buf_get_lines', i, i + 1, True)[0]
[deoplete] return self.request('nvim_buf_get_lines', i, i + 1, True)[0]
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/api/common.py", line 44, in request
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/api/common.py", line 44, in request
[deoplete] return self._session.request(name, self, *args, **kwargs)
[deoplete] return self._session.request(name, self, *args, **kwargs)
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/api/nvim.py", line 131, in request
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/api/nvim.py", line 131, in request
[deoplete] res = self._session.request(name, *args, **kwargs)
[deoplete] res = self._session.request(name, *args, **kwargs)
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/msgpack_rpc/session.py", line 98, in request
[deoplete] File "/usr/local/lib/python3.5/site-packages/neovim/msgpack_rpc/session.py", line 98, in request
[deoplete] raise self.error_wrapper(err)
[deoplete] raise self.error_wrapper(err)
[deoplete] neovim.api.nvim.NvimError: b'Index out of bounds'
[deoplete] neovim.api.nvim.NvimError: b'Index out of bounds'
[deoplete] Could not get completions from: ternjs. Use :messages for error details.
[deoplete] Could not get completions from: ternjs. Use :messages for error details.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:12 (5 by maintainers)
Top Results From Across the Web
pynvim.api.nvim.NvimError: b'Index out of bounds' · Issue #1041
Iterating through the buffer in Ultisnips fails, while it succeeds using the Neovim API (outside of the Ultisnips conext). This call fails. for ......
Read more >Api - Neovim docs
Nvim exposes a powerful API that can be used by plugins and external processes via RPC, ... Out-of-bounds indices are clamped to the...
Read more >How to solve treesitter/highlighter: Error executing lua problem ...
I just solved it using :TSInstall vim . Actually, run :checkhealth and the error in there would help in figuring out what is...
Read more >Nvim - Go Packages
Unlike "line2byte" vim function, throws error for out-of-bounds indexing. If Buffer is unloaded buffer, returns -1. func (*Batch) BufferOption ¶.
Read more >How to write neovim plugins in Lua - 2n
in lua/whid.lua local api = vim.api local buf, win local function ... (-1) -- ignoring out-of-bounds error (false) with lines (border_lines).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@joaumg about debuggin use deoplete feature
self.debug()
andself.info()
methodsabout the second one really I don’t know looks like is something how tern works most of this code is based on tern_for_vim https://github.com/ternjs/tern_for_vim/blob/master/script/tern.py#L177
Assuming there is a race condition on buf size and end, start uses len(buf)
Please reopen this if there are some weird results on autocompletes.