GNU bug report logs - #60983
29.0.60; Tree-sitter user-level control

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sat, 21 Jan 2023 11:12:01 UTC

Severity: normal

Found in version 29.0.60

Full log


Message #89 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Bug Report Emacs <bug-gnu-emacs <at> gnu.org>,
 Theodor Thornhill <theo <at> thornhill.no>
Subject: Re: 29.0.60; Tree-sitter user-level control
Date: Thu, 2 Feb 2023 19:07:07 -0800
I just read the new manual sections, thanks for the work! Do we want to mention treesit-font-lock-recompute-features in the user manual? That’s the only way for someone to add/remove specific features (as opposed to changing the decoration level). (We might also want to mention that changing treesit-font-lock-features directly doesn’t have any effect, similar to treesit-font-lock-level.)

treesit-font-lock-recompute-features is intended to be used in major mode hooks, like

(add-hook 'c-ts-mode-hook #'c-ts-setup)

(defun c-ts-mode-setup ()
  (treesit-font-lock-recompute-features
   '(emacs-devel)
   '(property bracket delimiter operator variable function)))

Yuan



This bug report was last modified 2 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.