Skip to main content

Questions tagged [js-mode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer

Switch Cases's code block doesn't get indented in JavaScript mode

I'm having trouble with the indentation of the cases's code-blocks in my switch statements it looks like this: switch(var) { case "case1": case's code line 1; case's code line 2; ...
5 votes
2 answers

Commenting out some JSX code section with Emacs 27 js-mode

When I comment out (M-x comment-dwim) some section of JSX code with the new js-mode in Emacs 27, it gives: // <Grid rows={rows} columns={columns}> // <Table /> // <TableHeaderRow /&...
1 vote
3 answers

How to set js-mode indent in Emacs >= 27.1

I have my tab width set to two spaces and this has worked fine for many years. I have just upgraded to Emacs 27.1, and now js-mode is displaying tabs as three spaces wide, ignoring my preferred ...
2 votes
0 answers

Emacs freezes when I type "="

I am in js-mode. The screenshot shows where I typed the = and emacs is completely frozen. No C-g, Esc, or q does anything. I have no idea how to even start debugging this.
1 vote
1 answer

How to automatically use rjsx-mode instead of js-jsx-mode

When I work with JSX files Emacs automatically switches to js-jsx-mode and acts sluggishly. When I switch it to rjsx-mode it works much faster. So the idea is to override one mode with another, so ...