summaryrefslogtreecommitdiff
path: root/lisp/progmodes/js.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-12-19 04:42:19 +0100
committerStefan Kangas <stefankangas@gmail.com>2022-12-19 04:42:19 +0100
commit6c540e38f4d9528f8e6dfdc44d1b95840efab456 (patch)
tree40f1738d943794dd738eb7c1b24b76dad49a32f8 /lisp/progmodes/js.el
parent0ef6d4c34f13c3b697d9ac183125cfb2630414b2 (diff)
parent12e26cc0c1b48c73f4a32cbdc658854eebcc5111 (diff)
downloademacs-6c540e38f4d9528f8e6dfdc44d1b95840efab456.tar.gz
Merge from origin/emacs-29
12e26cc0c1b ; * admin/git-bisect-start: Add mistakenly ommitted commi... 9a751e0a38b ruby-mode: Support endless singleton method definitions too ce7b7e5af3d Remove comment-start-skip preset in tree-sitter indentati... c1e015ae320 Fix recent change in tramp-smb.el cf1b771864a ; * etc/NEWS: Fix typos. 50d18bb6ea7 Make tramp-archive autoloads robust for older Emacs versions 3941cc29df3 ; Improve documentation of 'setopt' 6f88de109c8 ruby-mode: Support endless methods (bug#54702) 91dd893e343 ; * lisp/progmodes/sql.el (sql-product-interactive): Doc ... 138d9dc4cb0 * lisp/cus-edit.el (setopt--set): Warn instead of rasing ... d1e0542f336 Allow customising windmove user options with an empty prefix c2375e77914 Improve and extend admin/git-bisect-start 7cc2313eb0a Make 'rmail-summary-by-thread' faster 88e59b16cbe ; Improve documentation of installing tree-sitter and gra... 897f33bf316 Fix the MS-DOS build 660e941235d Avoid crashes in PGTK build due to signal in 'note_mouse_... 0fc5fb2d054 Fix MS-Windows build broken by recent treesit.c changes 5b2e6d04ce2 Fix wrong capture in typescript-ts-mode (bug#60167) cb8ccdd2670 Add rust-ts-mode (Bug#60136) 9fcf764dd73 Indentation fixes for jsx/tsx (bug#60169) 69f2c71135f Fix treesit-query-validate problem with view-mode 1fc7535546c Use cursor API in treesit-node-parent 5f0286c0afa Switch to use cursor API in treesit.c a275e436df4 Add treesit_assume_true and treesit_cursor_helper a54c7a8df0c Remove file-exists-in-trash-p 3e02029642c Update to Org 9.6-49-g47d129 4a8ff671b0e Don’t assume make-directory handler returns nil 44c83b239d3 Fix copy-directory bug when dest dir exists bef1edc9cac make-directory now returns t if dir already exists 8a9579ca29d Use make-directory handlers uniformly 627e7e0243d Improve documentation of 'file-exists-p' c9015ef55ff Fix resizing of mini-windows by 'set-minibuffer-message' 5a245bc786e Prevent Abort dialogs from async-compiling jobs on Windows 4d1e4a48938 Fix 'window-max-chars-per-line' when there are no fringes d65beb820cc ; Revert "; * lisp/subr.el (internal--with-narrowing): Si... 1c0b90e5f7d ruby-mode: Recognize instance or global var as first arg ... 3356c0cb163 Fix end-of-defun in ruby-mode # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r--lisp/progmodes/js.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index b8bfd5620d1..cbcca81baaa 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3451,14 +3451,13 @@ This function is intended for use in `after-change-functions'."
((parent-is "statement_block") parent-bol js-indent-level)
;; JSX
- ((parent-is "jsx_opening_element") parent js-indent-level)
- ((match "<" "jsx_fragment") parent 0)
- ((parent-is "jsx_fragment") parent js-indent-level)
+ ((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_element") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset)
((node-is "jsx_closing_element") parent 0)
- ((node-is "jsx_text") parent js-indent-level)
- ((parent-is "jsx_element") parent js-indent-level)
((node-is "/") parent 0)
- ((parent-is "jsx_self_closing_element") parent js-indent-level)))))
+ ((node-is ">") parent 0)))))
(defvar js--treesit-keywords
'("as" "async" "await" "break" "case" "catch" "class" "const" "continue"