rjsx-mode icon indicating copy to clipboard operation
rjsx-mode copied to clipboard

Indent inside of JSX tags is always 2 spaces instead of user setting

Open ariataylor96 opened this issue 5 years ago • 4 comments

This appears to be because of switching to js2-mode from js2-jsx-mode, as when I recompile the package using js2-jsx-mode everything goes back to normal and my editorconfig settings are respected.

ariataylor96 avatar Jun 18 '19 19:06 ariataylor96

What versions of each package are you using? What version of emacs?

felipeochoa avatar Jun 29 '19 14:06 felipeochoa

Might be a duplicate of #85

thornjad avatar Jun 29 '19 17:06 thornjad

This appears to be because of switching to js2-mode from js2-jsx-mode, as when I recompile the package using js2-jsx-mode everything goes back to normal and my editorconfig settings are respected.

Could you share the workarround, please? It looks like it's going to take some time until next release.

hanzhixing avatar Sep 09 '19 08:09 hanzhixing

The reason this is happening is because rjsx-mode uses sgml-basic-offset instead of js2-basic-offset to indent JSX. As a workaround you can set both of them to the same value and it should work.

guillaumebrunerie avatar Jul 11 '21 15:07 guillaumebrunerie