this post was submitted on 12 Oct 2023
0 points (50.0% liked)

Emacs

313 readers
3 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
 

Hello to all, As some of you probably did, i jumped on the treesitter train with emacs 29.1.

I replaced my major modes by their ts counterparts, and gave it a try. For the keywords colors, it was mostly fine, and at first I only checked that and was content with it.

Things went a bit sour when I starting writing code, in particular the indent-rules. I have used mainly the following so far :

  • cmake-ts-mode
  • c++-ts-mode
  • yaml-ts-mode

Over the past two weeks there has not been a work day where I did not have to complete or "fix" indentation rules to my liking.

On the one hand it is much easier than before to tweak things, where either there was a customizable variable, either you were screwed. Now you can add rich rules, kind of easily

On the other hand, the out of the box experience was much worse, barely usable indentation especially for the c++ mode which, despites its 4 presets, lacks the many quick toggles from cc-mode.

I do commend maintainers though for their amazing core implementation, the api + utilities make debugging tree sitter rules a breeze.

How has your treesitter Journey been so far ?

you are viewing a single comment's thread
view the rest of the comments
[–] WallyMetropolis@alien.top 1 points 1 year ago

As a side note, it's too bad that "ts" has become the default convention for treesitter modes because it always makes me think of TypeScript first.

If anyone would like any other useless opinions on things I don't contribute at all to, please, feel free to ask.