Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

[BUG] Inlay hints: Index out of bounds error #349

Open
LeonKowarschickKenbun opened this issue Mar 10, 2023 · 4 comments · May be fixed by #353
Open

[BUG] Inlay hints: Index out of bounds error #349

LeonKowarschickKenbun opened this issue Mar 10, 2023 · 4 comments · May be fixed by #353

Comments

@LeonKowarschickKenbun
Copy link

Recently, I've been getting the following error every once in a while, without a clearly identifiable cause:

    Error  10:59:34 msg_show.lua_error Error executing vim.schedule lua callback: ...nvim/lazy/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:142: Index out of bounds
  stack traceback:
    [C]: in function 'nvim_buf_get_lines'
    ...nvim/lazy/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:142: in function 'parse_hints'
    ...nvim/lazy/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:168: in function 'handler'
    /usr/local/share/nvim/runtime/lua/vim/lsp.lua:1383: in function ''
    vim/_editor.lua: in function <vim/_editor.lua:0>
@mattfbacon
Copy link

I get this error when I have an unclosed string literal. Very annoying.

@adaszko
Copy link

adaszko commented Aug 13, 2023

I'm getting these errors on an unclosed string literal, like let joined = snippet_lines.join("<CURSOR_IS_HERE>).

@mattfbacon
Copy link

I'm currently using https://github.com/MunifTanjim/rust-tools.nvim which does not have this issue.

@druskus20
Copy link

Getting these errors as well:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants