NVIM v0.8.0-dev-nightly-86-gd15a66d80
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by adam.regaszrethy@Adams-MacBook-Pro.local
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/share/nvim"
Run :checkhealth for more info
Additional context
I took a look through the code and the cause is that find_definition has an incorrect def_lookup. The function is being given the id of k_Foo_0_0_2_3 when it should have an id of k_Foo_0_0_6_0 which would let it have the same id as the function calls to Foo(). This id table gets setup here. If we were to debug this line, we would see node_entry.scope is nil which I believe is the issue since it should probably be parent. Looks like a bug in recurse_local_nodes but I'm not sure what's supposed to be going on in that thing.
Describe the bug
highlight_definitions
isn't finding the definition of functions because they are being scoped incorrectly.To Reproduce
init.lua:
Foo()
function calls.Foo()
function declaration will not be highlightedExpected behavior
I expect the
Foo()
function call to be highlightedOutput of
:checkhealth nvim_treesitter
Output of
nvim --version
Additional context
I took a look through the code and the cause is that find_definition has an incorrect
def_lookup
. The function is being given theid
ofk_Foo_0_0_2_3
when it should have an id ofk_Foo_0_0_6_0
which would let it have the same id as the function calls toFoo()
. This id table gets setup here. If we were to debug this line, we would seenode_entry.scope
isnil
which I believe is the issue since it should probably beparent
. Looks like a bug in recurse_local_nodes but I'm not sure what's supposed to be going on in that thing.