Function: bazel--completion-at-point-table
bazel--completion-at-point-table is a natively compiled function
defined in bazel.el.
Signature
(bazel--completion-at-point-table START)
Documentation
Return a completion table for ‘completion-at-point-functions’.
This is a helper function for ‘bazel-completion-at-point’. Provide completions for the Bazel file that the current buffer visits. START should be the buffer position of the beginning of the target name to complete. If ‘non-essential’ is non-nil and the buffer visits a remote file, avoid hitting the filesystem and only complete rule targets defined within the current buffer.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--completion-at-point-table (start)
"Return a completion table for ‘completion-at-point-functions’.
This is a helper function for ‘bazel-completion-at-point’.
Provide completions for the Bazel file that the current buffer
visits. START should be the buffer position of the beginning of
the target name to complete. If ‘non-essential’ is non-nil and
the buffer visits a remote file, avoid hitting the filesystem and
only complete rule targets defined within the current buffer."
(declare (ftype (function (integer) t)))
(cl-check-type start natnum)
(bazel--target-completion-table-with-metadata
(if (and non-essential (file-remote-p default-directory))
;; Completing targets in other packages would require filesystem
;; access. Only complete local rule targets starting with a colon.
(when (eql (char-after start) ?:)
(bazel--completion-table-with-prefix ":"
(completion-table-with-cache
(lambda (prefix)
(cl-check-type prefix string)
(bazel--complete-targets prefix nil))
completion-ignore-case)))
(bazel--target-completion-table nil nil))))