0

I have a .tsx file and a function that returns some html. It starts like:

return <div className=...

Then at some point I have a component with many arguments so I have to split them vertically. I get the following indentation

enter image description here

instead of

enter image description here

Looks like the data argument is indented more to the left than it should and the rest of the arguments are indented based on the open curly brace of data={data}

I run GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian

tide is also part of my tsx setup.

I don't have this issue with other files/similar cases. Only with this file. It's a long file compared to others (388 lines) and it has an interchanging mixture of html, typescript. Could I get this weird behavior just for this file? A corner case maybe?

Another thing I have just observed: If I set the buffer to html-mode then the indentation issue is fixed.

https://github.com/fxbois/web-mode/issues/1097

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.