Function: eglot--current-project

eglot--current-project is a byte-compiled function defined in eglot.el.gz.

Signature

(eglot--current-project)

Documentation

Return a project object for Eglot's LSP purposes.

This relies on project-current and thus on project-find-functions. Functions in the latter variable (which see) can query the value eglot-lsp-context to decide whether a given directory is a project containing a suitable root directory for a given LSP server's purposes.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot--current-project ()
  "Return a project object for Eglot's LSP purposes.
This relies on `project-current' and thus on
`project-find-functions'.  Functions in the latter
variable (which see) can query the value `eglot-lsp-context' to
decide whether a given directory is a project containing a
suitable root directory for a given LSP server's purposes."
  (let ((eglot-lsp-context t))
    (or (project-current)
        `(transient . ,(expand-file-name default-directory)))))