diff options
| author | jao <jao@gnu.org> | 2026-10-16 10:29:41 +0100 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2026-10-16 10:30:20 +0100 |
| commit | 2276be2575999fa174b910e371814bb712a11ea5 (patch) | |
| tree | 35bd19f6f471aacf7bed1e5efaf302605eb5ea03 /lib/prog | |
| parent | ec177172a6fc3d9dba1c6934f85abd93920fa9be (diff) | |
| download | elibs-2276be2575999fa174b910e371814bb712a11ea5.tar.gz elibs-2276be2575999fa174b910e371814bb712a11ea5.tar.bz2 | |
rust wee improvements
Diffstat (limited to 'lib/prog')
| -rw-r--r-- | lib/prog/jao-rust.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/prog/jao-rust.el b/lib/prog/jao-rust.el index ddb3307..1b2f736 100644 --- a/lib/prog/jao-rust.el +++ b/lib/prog/jao-rust.el @@ -49,11 +49,16 @@ (replace-regexp-in-string "\\(^\\|/\\)\\(mod\\|lib\\|main\\)$" "") (string-replace "/" "::"))))) +(defun jao-rust-crate-name () + (file-name-nondirectory + (replace-regexp-in-string "/$" "" (or (jao-rust--root) "")))) + ;;;###autoload (define-minor-mode jao-rust-show-module-mode "Show the current file's module in the mode line lighter" - :lighter (:eval (if-let* ((m (jao-rust-current-module-name))) - (format " ::%s" m)))) + :lighter (:eval (if-let* ((m (jao-rust-current-module-name)) + (c (jao-rust-crate-name))) + (format " %s::%s" c m)))) (defun jao-rust--tests-prefix () (let ((m (jao-rust-current-module-name))) |
