Function: bazel-starlark-mode

bazel-starlark-mode is an interactive and natively compiled function defined in bazel.el.

Signature

(bazel-starlark-mode)

Documentation

Major mode for editing Bazel Starlark files.

In addition to any hooks its parent mode bazel-mode might have run, this mode runs the hook bazel-starlark-mode-hook, as the final or penultimate step during initialization.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
;;;###autoload
(define-derived-mode bazel-starlark-mode bazel-mode "Starlark"
  "Major mode for editing Bazel Starlark files."
  (setq bazel--buildifier-type 'bzl)
  ;; In Starlark files, we do have Python-like function definitions, so use the
  ;; Python commands to navigate.
  (setq-local beginning-of-defun-function #'python-nav-beginning-of-defun)
  (setq-local end-of-defun-function #'python-nav-end-of-defun)
  (add-hook 'which-func-functions #'python-info-current-defun nil :local)
  (setq-local add-log-current-defun-function #'python-info-current-defun)
  (setq-local imenu-extract-index-name-function
              #'bazel-mode-extract-function-name)
  nil)