I have implemented a custom lezer grammar and added an view plugin extension to display a button in the editor if the node name matches a specific name.
Under normal circumstances, it works fine and the widget shows properly. However, when I fold the code in the editor, it appears the syntax tree does not know how to continue parsing the document with the folded code, and then starts from the @top entrypoint grammar token, which means the node I am looking for appears twice in the
syntaxTree.iterate() call instead of once. I’m not sure if it is something wrong with my lezer grammar or if this is a bug in the interop between the folding decorator and the language parsing.