bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65134: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in J


From: Danny Freeman
Subject: bug#65134: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX expressions
Date: Mon, 07 Aug 2023 16:10:13 -0400

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.

Attachment: 0001-lisp-progmodes-js.el-Fix-js-ts-mode-indent-bug-in-JS.patch
Description: Text Data

Thank you,
-- 
Danny Freeman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]