this post was submitted on 26 Oct 2023
1 points (100.0% liked)

Emacs

314 readers
2 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
 

Am I missing something or does the new yaml-ts-mode not having any rules for indentation? Seems odd in a language where indentation is semantically relevant.

GNU Emacs 29.1 (build 2, x86_64-unknown-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2023-08-03

Treesitter grammar installed and loaded via:

(use-package treesit-auto
  :config
  (add-to-list 'global-treesit-auto-modes '(not org-mode))
  (setq treesit-auto-install t)
  (global-treesit-auto-mode))
you are viewing a single comment's thread
view the rest of the comments
[–] mickeyp@alien.top 1 points 1 year ago (2 children)

It does not have indentation at all. It should, but for reasons, it does not. Furthermore, for reasons that strain credulity, it will highlight ERROR nodes with a font lock face, causing endless graphical flashing as you leave your tree-sitter tree in a brief error-state as you type.

I recommend you ditch it unless you have a good reason for using it. The third-party yaml-mode.el is excellent.

[–] dark-shadow@alien.top 1 points 1 year ago

It seems to be only a very rudimentary implementation of a yaml major mode. The only thing that it does better is that it works faster and seems to do more consistent highlighting. And I actually like what you describe as "graphical flashing" because it gives you immediate feedback when something is wrong. Yet I admit it is annoying too. Also, yaml-mode indentation while better still needs getting used to in comparison to other modes. I am back at using yaml and yaml-pro.

[–] skyler544@alien.top 1 points 1 year ago

I was afraid that this was the case; I've been trying to pare down on packages that I only occasionally use to reduce the complexity of my config, but this doesn't seem like a good thing to compromise on.