The previous fix for #59 fixed the first error, but there was another problem. I tracked down the following error to two things:
vim.inspect has a problem that causes an error on vim.inspect(tree:root():range()). Using a table instead fixes this error, i.e., vim.inspect( {tree:root():range()} ).
The local strategy's on_attach had a typo, where we accidentally reset a table that we wanted to keep if it exists.
This code should fix both of those problems.
Additionally I added a #define statement to the test file for c, since that was what caused this problem to show up (because it creates another tree in the same language in 0.9.4).
The previous fix for #59 fixed the first error, but there was another problem. I tracked down the following error to two things:
vim.inspect
has a problem that causes an error onvim.inspect(tree:root():range())
. Using a table instead fixes this error, i.e.,vim.inspect( {tree:root():range()} )
.on_attach
had a typo, where we accidentally reset a table that we wanted to keep if it exists.This code should fix both of those problems.
Additionally I added a
#define
statement to the test file for c, since that was what caused this problem to show up (because it creates another tree in the same language in 0.9.4).