Hello, I'm not sure if I'm in the right place since this bug is very weird and very specific. Basically, I'm using Neovim to write Astro and when writing an opening curly brace at a very specific position in the file, then Neovim freezes and I have no other choice but to force quit.
Here is an example of when the freeze happens in a file named "SomeComponent.astro":
---
// If I write an opening curly brace in here, it's totally fine:
const name = { name: "Thomas" };
---
<!-- If I write an opening curly brace here, as the very first character of this line,
then Neovim freezes. -->
<!-- However, if written before a closing HTML tag, it works fine. -->
<h1>Hello {name.name}</h1>
I disabled the astro_language_server (the LSP) from Mason and it didn't change anything. My assumption is that the problem is caused by the Tree sitter specifically in an .astro file. Probably an infinite loop in the parsing process. Unfortunately I do not know how to give you more information.
Steps to Reproduce
Create an empty Astro project and open it with Neovim while having the treesitter plugin.
Open a file ending with .astro and go to the first line after the --- part:
---
---
<!-- Here -->
<h1>Hello</h1>
Try writing an opening curly brace where it is said "Here" in the above example, without the comment. For me, it freezes neovim.
Notes:
I'm using the latest version of neovim
I ran :TSUpdate and it says I'm using the latest versions
I do not know if this problem was caused due to an action I did because it's my first day using Astro.
I'm using macOS (version Monterey) with the default shortcut (for an AZERTY French layout at least) which is Alt (
I'm using iterm2 but the problem doesn't come from there since it also happens in the default Terminal of macOS.
I do not have any conflicting shortcut and this problem only happens in .astro files, nowhere else.
Here is some of my Neovim plugins that may be relevant (with Packer):
Describe the Bug
Hello, I'm not sure if I'm in the right place since this bug is very weird and very specific. Basically, I'm using Neovim to write Astro and when writing an opening curly brace at a very specific position in the file, then Neovim freezes and I have no other choice but to force quit.
Here is an example of when the freeze happens in a file named "SomeComponent.astro":
I disabled the astro_language_server (the LSP) from Mason and it didn't change anything. My assumption is that the problem is caused by the Tree sitter specifically in an
.astro
file. Probably an infinite loop in the parsing process. Unfortunately I do not know how to give you more information.Steps to Reproduce
.astro
and go to the first line after the---
part:Try writing an opening curly brace where it is said "Here" in the above example, without the comment. For me, it freezes neovim.
Notes:
:TSUpdate
and it says I'm using the latest versionsAlt (
.astro
files, nowhere else.Here is some of my Neovim plugins that may be relevant (with Packer):