ITADN

Seemingly infinite loop that freezes neovim

#123Closedyshui 创建于 2025-01-11
Y
yshuicommented
Not sure when this started, but recently I've been getting freezes when I try to open `.nix` files in neovim. I managed to trace it back to this loop: https://github.com/nvim-treesitter/nvim-treesitter/blob/9ef2e37e1b3200004f872a536f0c8ed968b742e6/lua/nvim-treesitter/locals.lua#L286 as an experiment i counted the number of loops executed, and threw an error if it exceeded an absurd number (say, 100000). by doing that, I was able to unfreeze neovim. and if i print out `iter_node == iter_node:parent()`, it does evaluate to `true` sometimes.
关闭于 2025-02-06 4 条评论