summaryrefslogtreecommitdiff
path: root/test/manual
diff options
context:
space:
mode:
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>2019-04-09 18:44:36 -0700
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>2019-04-09 18:44:36 -0700
commit5772971f255c7031753e02492ae979c501018a50 (patch)
treefd79d0b01e84787dcb61fd97c1c695fec60ae598 /test/manual
parentd82603747564063f908c9c877449c827a9808528 (diff)
downloademacs-5772971f255c7031753e02492ae979c501018a50.tar.gz
Add new defcustom js-jsx-indent-level
* lisp/progmodes/js.el (js-jsx-indent-level): New variable for users to set JSX indentation differently than JS, like before. (js-jsx--contextual-indentation): Respect js-jsx-indent-level when it’s set. * test/manual/indent/jsx-indent-level.jsx: New test for js-jsx-indent-level.
Diffstat (limited to 'test/manual')
-rw-r--r--test/manual/indent/jsx-indent-level.jsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/manual/indent/jsx-indent-level.jsx b/test/manual/indent/jsx-indent-level.jsx
new file mode 100644
index 00000000000..0a84b9eb77a
--- /dev/null
+++ b/test/manual/indent/jsx-indent-level.jsx
@@ -0,0 +1,13 @@
+return (
+ <element>
+ <element>
+ Hello World!
+ </element>
+ </element>
+)
+
+// Local Variables:
+// indent-tabs-mode: nil
+// js-indent-level: 4
+// js-jsx-indent-level: 2
+// End: