Questions tagged [js-mode]
5 questions
5
votes
1 answer
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:
//
//
//
//
Is there any way to make js-mode behave like it…

cjauvin
- 594
- 4
- 15
1
vote
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.

Finn Luca Frotscher
- 111
- 1
1
vote
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;
break;
default:
stuff...
break;
}
I'd…

Santiago Lerin
- 11
- 1
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 that rjsx-mode is used instead of js-jsx-mode.
What…

Navidot
- 732
- 5
- 12
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 settings (which still apply to other modes, it's only…

Malvineous
- 265
- 1
- 8