Questions tagged [js-mode]
The js-mode tag has no usage guidance.
5 questions
5
votes
2
answers
375
views
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 /&...
3
votes
1
answer
100
views
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;
...
2
votes
0
answers
39
views
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
883
views
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 ...
1
vote
3
answers
1k
views
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 ...