doomemacs/modules/lang/rust/autoload/rust.el
Henrik Lissner 1c74b140fc
fix(rust): rust-mode + rustic interop
Ensures that these two packages work together seamlessly and can't be
wedged apart by clumsy user or package config. Also fixes the load order
issues that cause 'inconsistent hierarchy' errors for rust-mode,
rust-ts-mode, and rustic-mode.

Fix: #8618
2025-12-31 20:03:00 -05:00

17 lines
440 B
EmacsLisp

;;; lang/rust/autoload/rust.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +rust-cargo-project-p ()
"Return t if this is a cargo project."
(locate-dominating-file buffer-file-name "Cargo.toml"))
;;
;;; Custom Cargo commands
(autoload 'rustic-run-cargo-command "rustic-cargo")
;;;###autoload
(defun +rust/cargo-audit ()
"Run 'cargo audit' for the current project."
(interactive)
(rustic-run-cargo-command "cargo audit"))