emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: toml-ts-mode: first draft


From: Randy Taylor
Subject: Re: toml-ts-mode: first draft
Date: Mon, 12 Dec 2022 21:17:41 +0000


On Monday, December 12th, 2022 at 15:41, Jostein Kjønigsen <jostein@secure.kjonigsen.net> wrote:

On 12.12.2022 00:01, Yuan Fu wrote:
Looks great!

+  (unless (treesit-ready-p 'toml)
+    (error "Tree-sitter for TOML isn't avilable”))

Treesit-ready-p already raises a warning when something goes wrong. So you want to either pass the QUIET argument or let it do the barking ;-)

Yuan

So... Any other requests I should look into before we start considering merging this? :)

--

Jostein

Looks good! A few silly nits:

- It would be nice to keep batch.sh alphabetized (so maybe move typescript while you're there).
- Most modes put a newline between features in their font-lock rules definition. I think we should stick to that.
- I think comment should be moved out of pair to its own feature.
- For features like 'number, I like to group them (e.g. [(int) (float]), then you only need to specify @font-lock-number-face once.
- ;;(setq global-toml-node (treesit-buffer-root-node)) seems like this was leftover debugging to be removed?
- treesit-font-lock-feature-list should have 4 levels, and delimiter and error should probably go in the 4th one (side note, we should all figure out the "final" list of general features and which levels they belong to). The first level should maybe just be comment on its own, the rest looks good to me.
- Indentation support for multi-line arrays would be nice (and maybe even follow the indentation of the previous line if that's not too hard and doesn't cause everything to blow up?)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]