diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2023-02-21 10:58:00 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2023-02-21 10:58:00 +0100 |
commit | 839a86b02ba0043f5c8d0ac1f33c9c7b55314d00 (patch) | |
tree | 25958e54483b62683b1d27fb8707d70b51405f26 /lisp/progmodes/js.el | |
parent | db3fea2e5ce46229ae40aa9ca6a89964261a7a5a (diff) | |
parent | 5a864f23eb8a36ef435136c5b41cb01b875df399 (diff) | |
download | emacs-839a86b02ba0043f5c8d0ac1f33c9c7b55314d00.tar.gz |
Merge from origin/emacs-29
5a864f23eb8 regex-emacs.c: Reduce the use of backtracking a bit further
e83c78b8c77 Eglot: respect user's Eldoc configuration by default
5d0b45cd67b Make the native compiler always use `make-temp-file' for ...
88ee92e61d7 ; * lisp/progmodes/rust-ts-mode.el (treesit-node-end): De...
02aba20d528 Update to Transient v0.3.7-216-gfe40342
d7010d64b21 Add declaration_list to c-ts-common-indent-type-regexp-alist
19480aa30e3 Typescript-ts-mode: Add switch case handling
dfc850ca022 Fix object initializer for csharp-mode (bug#61541)
fc4bfa76db9 Update to Org 9.6.1-34-geea8da
afbce8bb467 Improve tree-sitter indent anchor prev-adaptive-prefix (b...
2e6093b425e Adjust jsx indentation
c544df4fa3f Cleanup preproc indent for c-ts-mode (bug#61558)
d397f3d5084 Add comment style toggle for c-ts-mode (bug#61550)
683961cd733 * lisp/simple.el (choose-completion): Check for completio...
1ac05eac74b rust-ts-mode--font-lock-settings: Avoid the explicit 'def...
b5bea14ca17 * lisp/progmodes/xref.el: Bump the version.
# Conflicts:
# src/comp.c
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r-- | lisp/progmodes/js.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 90813c8de34..dc49d7e818c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3458,12 +3458,14 @@ This function is intended for use in `after-change-functions'." ((match "<" "jsx_fragment") parent 0) ((parent-is "jsx_fragment") parent js-indent-level) ((node-is "jsx_closing_element") parent 0) - ((node-is "jsx_element") parent js-indent-level) + ((match "jsx_element" "statement") parent js-indent-level) ((parent-is "jsx_element") parent js-indent-level) + ((parent-is "jsx_text") parent-bol js-indent-level) ((parent-is "jsx_opening_element") parent js-indent-level) ((parent-is "jsx_expression") parent-bol js-indent-level) ((match "/" "jsx_self_closing_element") parent 0) ((parent-is "jsx_self_closing_element") parent js-indent-level) + ;; FIXME(Theo): This no-node catch-all should be removed. When is it needed? (no-node parent-bol 0))))) (defvar js--treesit-keywords @@ -3873,7 +3875,7 @@ See `treesit-sexp-type-regexp' for more information.") ;; Electric-indent. (setq-local electric-indent-chars - (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*". + (append "{}():;,<>/" electric-indent-chars)) ;FIXME: js2-mode adds "[]*". (setq-local electric-layout-rules '((?\; . after) (?\{ . after) (?\} . before))) |