You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error executing vim.schedule lua callback: .../nvim-treesitter-endwise/lua/nvim-treesitter/endwise.lua:148: attempt to call method 'range' (a nil value)
stack traceback:
.../nvim-treesitter-endwise/lua/nvim-treesitter/endwise.lua:148: in function 'endwise'
.../nvim-treesitter-endwise/lua/nvim-treesitter/endwise.lua:199: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Looking at the code it makes sense because indent_node is only set in some cases, and nil in other cases:
localindent_node, cursor_node, endable_nodeforid, nodeinpairs(match) doifquery.captures[id] =='indent' thenindent_node=node-- `indent_node` is only set if we get hereelseifquery.captures[id] =='cursor' thencursor_node=nodeelseifquery.captures[id] =='endable' thenendable_node=nodeendendlocalindent_node_range= { indent_node:range() } -- This is the error throwing line
I'm not sure why this bug hasn't shown up until now though.
The text was updated successfully, but these errors were encountered:
metiulekm
added a commit
to metiulekm/nvim-treesitter-endwise
that referenced
this issue
Oct 3, 2024
I started getting this error recently:
Looking at the code it makes sense because
indent_node
is only set in some cases, andnil
in other cases:I'm not sure why this bug hasn't shown up until now though.
The text was updated successfully, but these errors were encountered: