Variable: treesit-primary-parser

treesit-primary-parser is a buffer-local variable defined in treesit.el.gz.

Documentation

The primary parser for this buffer.

The primary parser should be a parser that parses the entire buffer, as opposed to embedded parsers which parses only part of the buffer.

View in manual

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
;;; Parser API supplement

;; The primary parser will be accessed frequently (after each re-parse,
;; before redisplay, etc, see
;; `treesit--font-lock-mark-ranges-to-fontify'), so we don't want to
;; allow it to be a callback function which returns the primary parser
;; (it might be slow).  It's not something that needs to be dynamic
;; anyway.
(defvar-local treesit-primary-parser nil
  "The primary parser for this buffer.

The primary parser should be a parser that parses the entire buffer, as
opposed to embedded parsers which parses only part of the buffer.")