Nvim-treesitter: ml_get invalid lnum when adding a parenthesis in python

Created on 8 Sep 2020  路  6Comments  路  Source: nvim-treesitter/nvim-treesitter

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(`

  1. See the error in the screenshot:
    treesitter

Expected behavior
The error does not block me from typing unless I type the closing parenthesis )

Output of :checkhealth nvim_treesitter


health#nvim_treesitter#check

Installation

  • OK: git executable found.
  • OK: cc executable found.

elm parser healthcheck

c parser healthcheck

  • OK: c parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

java parser healthcheck

python parser healthcheck

  • OK: python parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

lua parser healthcheck

  • OK: lua parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

go parser healthcheck

nix parser healthcheck

yaml parser healthcheck

json parser healthcheck

jsdoc parser healthcheck

fennel parser healthcheck

swift parser healthcheck

query parser healthcheck

vue parser healthcheck

scala parser healthcheck

rst parser healthcheck

javascript parser healthcheck

  • OK: javascript parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: textobjects.scm found.
  • OK: fold.scm found.

toml parser healthcheck

regex parser healthcheck


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

bug

Most helpful comment

Hi, this is a known issue, that will be partially fixed upstream by : https://github.com/neovim/neovim/pull/12872

All 6 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xaljer picture xaljer  路  4Comments

pierpo picture pierpo  路  4Comments

etrnal70 picture etrnal70  路  6Comments

krkhan picture krkhan  路  3Comments

huyvohcmc picture huyvohcmc  路  6Comments