From f58349301167a646059595951f2b721c4e3129d1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 Jan 2019 11:40:01 +0100 Subject: Shorten projectile mode line --- emacs/.emacs.d/init.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 2edd2ae..1553e67 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -210,6 +210,13 @@ '(projectile-completion-system (quote ivy)) '(projectile-enable-caching t) '(projectile-mode-line nil) + '(projectile-mode-line-function + (lambda nil + (format "%s:%s" projectile-mode-line-prefix + (or + (projectile-project-name) + "-")))) + '(projectile-mode-line-prefix "P") '(projectile-use-git-grep t) '(quack-pretty-lambda-p t) '(quack-run-scheme-always-prompts-p nil) @@ -453,6 +460,14 @@ (add-to-list 'auto-mode-alist '("\\.gyp" . python-mode)) (add-to-list 'auto-mode-alist '("\\.gypi" . python-mode)) +;;; Projectile + +(defun my-projectile-mode-line () + "Report project name in the modeline." + (format "%s[%s%s]" + projectile-mode-line-prefix + (or (projectile-project-name) "-"))) + ;;; Launch (spaceline-spacemacs-theme) -- cgit v1.2.1