Variable: treesit-extra-load-path

treesit-extra-load-path is a customizable variable defined in treesit.c.

Value

nil

Documentation

Additional directories to look for tree-sitter language definitions.

The value should be a list of directories. When trying to load a tree-sitter language definition, Emacs first looks in the directories mentioned in this variable, then in the tree-sitter subdirectory of user-emacs-directory, and then in the system default locations for dynamic libraries, in that order. The first writeable directory in the list is special: it's used as the default directory when automatically installing the language grammar using treesit-ensure-installed.

View in manual

Probably introduced at or before Emacs version 29.1.

Source Code

// Defined in /usr/src/emacs/src/treesit.c
  DEFVAR_LISP ("treesit-extra-load-path",
	       Vtreesit_extra_load_path,
	       doc:
	       /* Additional directories to look for tree-sitter language definitions.
The value should be a list of directories.
When trying to load a tree-sitter language definition,
Emacs first looks in the directories mentioned in this variable,
then in the `tree-sitter' subdirectory of `user-emacs-directory', and
then in the system default locations for dynamic libraries, in that order.
The first writeable directory in the list is special: it's used as the
default directory when automatically installing the language grammar
using `treesit-ensure-installed'.  */);