this post was submitted on 19 Nov 2023
1 points (100.0% liked)

Emacs

305 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

When using cs-ts-mode, it incorrectly forces me to use paranthesis. For example:

  if (whatever == -1)

it won't auto-indent the next line unless I use braces {} with the if statement, even if there is just one statement with a semi-colon after the if. Also, as I'm typing, it weirdly indents my functions as I type them.

Any way to fix these?

you are viewing a single comment's thread
view the rest of the comments
[–] eli-zaretskii@alien.top 1 points 10 months ago

I cannot reproduce this. Maybe the surrounding code in your case caused what you describe, but if I take a valid C function and insert if (whatever == -1) into it, then after typing RET, the next line will be indented as expected.