diff options
| author | Jackson Ray Hamilton | 2019-04-09 18:50:28 -0700 |
|---|---|---|
| committer | Jackson Ray Hamilton | 2019-04-09 18:50:28 -0700 |
| commit | c0b09f42f5107dc009629ee73a790ca1d62d290a (patch) | |
| tree | 78375bd765654e783df38e09fe0c27485817211c | |
| parent | 5772971f255c7031753e02492ae979c501018a50 (diff) | |
| download | emacs-c0b09f42f5107dc009629ee73a790ca1d62d290a.tar.gz emacs-c0b09f42f5107dc009629ee73a790ca1d62d290a.zip | |
* etc/NEWS: Document way to revert to old JSX indentation behavior
| -rw-r--r-- | etc/NEWS | 19 |
1 files changed, 13 insertions, 6 deletions
| @@ -1294,12 +1294,19 @@ conventions. | |||
| 1294 | 1294 | ||
| 1295 | --- | 1295 | --- |
| 1296 | *** Indentation uses 'js-indent-level' instead of 'sgml-basic-offset'. | 1296 | *** Indentation uses 'js-indent-level' instead of 'sgml-basic-offset'. |
| 1297 | It was never really intuitive that JSX indentation would be controlled | 1297 | Since JSX is a syntax extension of JavaScript, it makes the most sense |
| 1298 | by an SGML variable. JSX is a syntax extension of JavaScript, so it | 1298 | for JSX expressions to be indented the same number of spaces as other |
| 1299 | should be indented just like any other expression in JavaScript. This | 1299 | JS expressions. This is a breaking change, but it probably aligns |
| 1300 | is technically a breaking change, but it will probably align with how | 1300 | with how you'd expect this indentation to behave. If you want JSX to |
| 1301 | you would normally expect for this indentation to be controlled, and | 1301 | be indented like JS, you won't need to change your config. |
| 1302 | you probably won't need to change your config. | 1302 | |
| 1303 | The old behavior can be emulated by controlling JSX indentation | ||
| 1304 | independently of JS, by setting 'js-jsx-indent-level'. | ||
| 1305 | |||
| 1306 | --- | ||
| 1307 | *** New defcustom 'js-jsx-indent-level' for different JSX indentation. | ||
| 1308 | If you wish to indent JSX by a different number of spaces than JS, set | ||
| 1309 | this variable to the desired number. | ||
| 1303 | 1310 | ||
| 1304 | --- | 1311 | --- |
| 1305 | *** New defcustom 'js-jsx-attribute-offset' for JSX attribute indents. | 1312 | *** New defcustom 'js-jsx-attribute-offset' for JSX attribute indents. |