Closed DeeeeLAN closed 5 years ago
it looks like the second issue is caused by the auto-indent kicking in when the opening brace is typed, and failing, moving the cursor.
Here is a screenshot of a snippet of code showing the default indentations. Most of these failed.
I tried removing the 'sgml-attribute-offset' from #L1396 and so for that seems to have helped. Not sure if the issue is completely gone yet, or if I caused other issues by removing that.
+1
If I have a react element such as this:
indentation doesn't work reliably on the properties. Sometimes it indents them to the correct location, but sometimes it does nothing and gives the error "Symbol's value as variable is void: sgml-attribute-offset". js2-jsx-mode does indent them, but not to the proper location.
Equally frustrating (and I think related, it gives the same error): When typing one of those properties, as soon as I type the opening bracket: {, the screen flashes and moves the cursor to the beginning of the line.