Function: neocaml-install-grammars

neocaml-install-grammars is an interactive and natively compiled function defined in neocaml.el.

Signature

(neocaml-install-grammars &optional FORCE)

Documentation

Install required language grammars if not already available.

With prefix argument FORCE, reinstall grammars even if they are already installed. This is useful after upgrading neocaml to a version that requires a newer grammar.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/ahssdx4rwzyxhyhavpn0bkznk13xrggi-emacs-packages-deps/share/emacs/site-lisp/elpa/neocaml-20260907.2015/neocaml.el
(defun neocaml-install-grammars (&optional force)
  "Install required language grammars if not already available.
With prefix argument FORCE, reinstall grammars even if they are
already installed.  This is useful after upgrading neocaml to a
version that requires a newer grammar."
  (interactive "P")
  (dolist (recipe neocaml-grammar-recipes)
    (let ((grammar (car recipe)))
      (when (or force (not (treesit-language-available-p grammar nil)))
        (message "Installing %s tree-sitter grammar..." grammar)
        ;; `treesit-language-source-alist' is dynamically scoped.
        ;; Binding it in this let expression allows
        ;; `treesit-install-language-grammar' to pick up the grammar recipes
        ;; without modifying what the user has configured themselves.
        (let ((treesit-language-source-alist neocaml-grammar-recipes))
          (treesit-install-language-grammar grammar))))))