Describe the bug
I am getting the Vim error E315: ml_get invalid lnum: {last_line of file + 1} when trying to type a (
To Reproduce
1.Write or autocomplete a method name, then type(`

Expected behavior
The error does not block me from typing unless I type the closing parenthesis )
Output of :checkhealth nvim_treesitter
git executable found.cc executable found.highlights.scm query found for elmlocals.scm query found for elmtextobjects.scm query found for elmfold.scm query found for elmhighlights.scm found.locals.scm found.textobjects.scm found.fold.scm found.highlights.scm found.locals.scm found.textobjects.scm query found for javafold.scm query found for javahighlights.scm found.locals.scm found.textobjects.scm found.fold.scm found.highlights.scm found.locals.scm found.textobjects.scm found.fold.scm found.highlights.scm found.locals.scm found.textobjects.scm found.fold.scm query found for gohighlights.scm query found for nixlocals.scm query found for nixtextobjects.scm query found for nixfold.scm query found for nixhighlights.scm query found for yamllocals.scm query found for yamltextobjects.scm query found for yamlfold.scm query found for yamlhighlights.scm found.locals.scm query found for jsontextobjects.scm query found for jsonfold.scm query found for jsonhighlights.scm query found for jsdoclocals.scm query found for jsdoctextobjects.scm query found for jsdocfold.scm query found for jsdochighlights.scm found.locals.scm found.textobjects.scm query found for fennelfold.scm query found for fennelhighlights.scm query found for swiftlocals.scm query found for swifttextobjects.scm query found for swiftfold.scm query found for swifthighlights.scm found.locals.scm found.textobjects.scm query found for queryfold.scm query found for queryhighlights.scm query found for vuelocals.scm query found for vuetextobjects.scm query found for vuefold.scm query found for vuehighlights.scm query found for scalalocals.scm query found for scalatextobjects.scm query found for scalafold.scm query found for scalahighlights.scm found.locals.scm found.textobjects.scm found.fold.scm query found for rsthighlights.scm found.locals.scm found.textobjects.scm found.fold.scm found.highlights.scm found.locals.scm found.textobjects.scm query found for tomlfold.scm query found for tomlhighlights.scm found.locals.scm query found for regextextobjects.scm query found for regexfold.scm query found for regex
Output of nvim --version
NVIM v0.5.0-672-gd8e6a0396
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-4bd3028d-02ef-415e-85e0-aaf8463bff64
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/travis/build/neovim/bot-ci/build/neovim/build/nvim.AppDir/usr/share/nvim
"
Run :checkhealth for more info
Additional context
I am using nvim's built-in lsp + completion-nvim but if I disable both plugins I still get the same error
I'm also experiencing this. Happens a lot when you're opening parenthesis but could also be an LSP error. The error mostly disappears when you somehow make the current expression complete (e.g. close parenthesis or : at end of line of if)
It's not an lsp error i experienced this (in javascript) and it stops when i disable treesitter highlighting
Hi, this is a known issue, that will be partially fixed upstream by : https://github.com/neovim/neovim/pull/12872
I'm also experiencing this. Happens a lot when you're opening parenthesis but could also be an LSP error. The error mostly disappears when you somehow make the current expression complete (e.g. close parenthesis or
:at end of line of if)
As @kyazdani42 mentioned, it seems like it is a highlighting issue as disabling treesitter highlighting makes the error disappear as well
Hi, this is a known issue, that will be partially fixed upstream by : neovim/neovim#12872
Oh great thanks! Should I close the issue ticket then?
@josenava can you try again and see if this issue is solved now?
Hey good news @stsewd
I've just tried with latest neovim version NVIM v0.5.0-702-g569e75799 and current nvim-treesitter and I am not able to reproduce the issue anymore :)
Thanks (to every collaborator) for the hard work on treesitter, I am really enjoying the highlighting.
Most helpful comment
Hi, this is a known issue, that will be partially fixed upstream by : https://github.com/neovim/neovim/pull/12872