Open sezaru opened 8 months ago
Thanks for the report. This sounds like a treesitter issue, but will investigate on my side and report upstream if I can reproduce.
I've been occasionally getting the same symptoms but wasn't able to pin point what part was causing it other than it was while editing Elixir related files. I can reproduce @sezaru 's example on my machine every time: macOS 14.4, emacs 30.0.50 (w/ doomemacs). I can also try with minimal configuration using emacs -Q
if you would find that useful
I have exactly the same issue with some of the files in my projects. It does not happen with other treesitter-based editors like nvim or zed (I am using this editors to work with such files because it literally impossible to get work done this way). And it does not happen in other Treesitter modes like Python or TS.
Also I can reproduce with clean emacs -Q
.
Sounds like something in Emacs/Treesitter integration?
@casouri tracked it down to tree-sitter itself, so you can follow this issue: https://github.com/tree-sitter/tree-sitter/issues/3620
I've noticed that when I use elixir-ts-mode with elixir and heex tree-sitters with emacs, sometimes it will hang and start consuming all the system memory.
I was able to create an elixir file that is easy to reproduce the issue.
To reproduce it, first create an elixir file with the following code:
Now, go to line 6 (right between the
<:loading></:loading>
tags and type (character by character)<.some_component a={
.When you reach the
{
character, emacs will freeze and it will start consuming all the RAM memory available until it crashes with OOM.I also tested this with the latest emacs 30 git commit and I can reproduce the same issue.