Function: neocaml-project-find
neocaml-project-find is a natively compiled function defined in
neocaml.el.
Signature
(neocaml-project-find DIR)
Documentation
Return the dune project containing DIR, or nil.
The project root is the closest directory at or above DIR that contains
a dune-project file.
Source Code
;; Defined in /nix/store/ahssdx4rwzyxhyhavpn0bkznk13xrggi-emacs-packages-deps/share/emacs/site-lisp/elpa/neocaml-20260907.2015/neocaml.el
;;;; Project integration
;;
;; Teach `project.el' that a directory containing a `dune-project' file is a
;; project root, so project-wide commands (find-file, search, compile, ...)
;; work for OCaml/dune projects. Registered with APPEND so version-control
;; detection still takes precedence when a project is under git/hg/etc.; this
;; mainly fills the gap for dune projects that aren't under version control.
(defun neocaml-project-find (dir)
"Return the dune project containing DIR, or nil.
The project root is the closest directory at or above DIR that contains
a `dune-project' file."
(when-let* ((root (locate-dominating-file dir "dune-project")))
(list 'neocaml (expand-file-name root))))