GNU bug report logs - #65134
[PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX expressions

Previous Next

Package: emacs;

Reported by: Danny Freeman <danny <at> dfreeman.email>

Date: Mon, 7 Aug 2023 20:11:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Freeman <danny <at> dfreeman.email>
To: bug-gnu-emacs <at> gnu.org
Cc: v.pupillo <at> gmail.com
Subject: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX
 expressions
Date: Mon, 07 Aug 2023 16:10:13 -0400
[Message part 1 (text/plain, inline)]
Tags: patch


Hello,

I have a patch for a bug I found in js-ts-mode.
When editing jsx blocks, the indentation does not work.

For example, in a file with the following file with JSX code in it
and js-ts-mode enabled

```
function App() {
  return (
    <div className="App">
    </div>
  );
}
```

placing your cursor at the end of the opening div tag and pressing ENTER
does not indent, instead there is no indentation.

This patch corrects that by properly expanding the
`js-jsx--treesit-indent-compatibility-bb1f97b' function, which returns
some indent rules.

[0001-lisp-progmodes-js.el-Fix-js-ts-mode-indent-bug-in-JS.patch (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
Thank you,
-- 
Danny Freeman

This bug report was last modified 1 year and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.