aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuri Linkov2025-11-28 09:23:57 +0200
committerJuri Linkov2025-11-28 09:23:57 +0200
commita1ab5f429daa7484874f9c76ecb9add7e93756e2 (patch)
treee7aeab82d3bd62e54735bf40ce189592be83270a /src
parenta4c5e64b110edd344da270c521a9f485860acfcd (diff)
downloademacs-a1ab5f429daa7484874f9c76ecb9add7e93756e2.tar.gz
emacs-a1ab5f429daa7484874f9c76ecb9add7e93756e2.zip
* lisp/cus-start.el: Make 'treesit-extra-load-path' customizable.
* lisp/treesit.el (treesit-auto-install-grammar): Add the value 'ask-dir'. (treesit-ensure-installed): When 'treesit-auto-install-grammar' is 'ask' or 'ask-dir', ask for the directory to install the grammar library using the first writable directory of 'treesit-extra-load-path' as default. Also add the provided directory to 'treesit-extra-load-path' afterwards. * src/treesit.c (treesit-extra-load-path): In the docstring mention the fact that the first directory is special (bug#79862).
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/treesit.c b/src/treesit.c
index 3230d0a50a1..d3b6f36ec81 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -5273,7 +5273,9 @@ The value should be a list of directories.
5273When trying to load a tree-sitter language definition, 5273When trying to load a tree-sitter language definition,
5274Emacs first looks in the directories mentioned in this variable, 5274Emacs first looks in the directories mentioned in this variable,
5275then in the `tree-sitter' subdirectory of `user-emacs-directory', and 5275then in the `tree-sitter' subdirectory of `user-emacs-directory', and
5276then in the system default locations for dynamic libraries, in that order. */); 5276then in the system default locations for dynamic libraries, in that order.
5277The first writeable directory in the list is special: it's used as the
5278default directory when automatically installing the language grammar. */);
5277 Vtreesit_extra_load_path = Qnil; 5279 Vtreesit_extra_load_path = Qnil;
5278 5280
5279 DEFVAR_LISP ("treesit-thing-settings", 5281 DEFVAR_LISP ("treesit-thing-settings",