Function: treesit--install-language-grammar-build-recipe
treesit--install-language-grammar-build-recipe is a byte-compiled
function defined in treesit.el.gz.
Signature
(treesit--install-language-grammar-build-recipe LANG)
Documentation
Interactively produce a download/build recipe for LANG and return it.
See treesit-language-source-alist for details.
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit--install-language-grammar-build-recipe (lang)
"Interactively produce a download/build recipe for LANG and return it.
See `treesit-language-source-alist' for details."
(when (y-or-n-p (format "There is no recipe for %s, do you want to build it interactively?" lang))
(cl-labels ((empty-string-to-nil (string)
(if (equal string "") nil string)))
(list
lang
(let ((repo-default (format "https://github.com/tree-sitter/tree-sitter-%s" lang)))
(read-string
"Enter the URL of the Git repository of the language grammar: "
(and (treesit--check-repo-url repo-default) repo-default)))
(empty-string-to-nil
(read-string
"Enter the tag or branch (default: default branch): "))
(empty-string-to-nil
(read-string
"Enter the subdirectory in which the parser.c file resides (default: \"src\"): "))
(empty-string-to-nil
(read-string
"Enter the C compiler to use (default: auto-detect): "))
(empty-string-to-nil
(read-string
"Enter the C++ compiler to use (default: auto-detect): "))))))