Skip to content

bug: infinite loop in certain context #143

@goulf-3m

Description

@goulf-3m

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-julia

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

tree-sitter 0.22.6 (b40f342067a89cd6331bf4c27407588320f3c263)

Describe the bug

nvim will be blocked by a infinite loop in certain context.
In my setup, the error disappears when both matchup' and highlight' options for `nvim-trreesitter' are disabled.

Steps To Reproduce/Bad Parse Tree

  1. write a file.jl
function a()
    map([1:10]) do f
    end
end
  1. in the `do' block, type
for hello i
  1. nvim will block the instant `i' is typed.

If `hello' is replaced by a very long name, the error disappears.

Expected Behavior/Parse Tree

Nvim (treesitter) should not block when a partial expression is typed.

Repro

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions