From b117f2e86920c0bb3a61ce64c59a6f5db05a11e9 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Mon, 9 Sep 2019 17:09:52 +0800 Subject: [PATCH] Support find-file-in-project. --- README.md | 8 ++++---- doom-modeline-core.el | 3 +++ doom-modeline.el | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 91e9387..7d50a1b 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ The `doom-modeline` was designed for minimalism, and offers: - A workspace number segment for `eyebrowse` - A perspective name segment for `persp-mode` - A window number segment for `ace-window`, `winum` and `window-numbering` -- An indicator for modal editing state, including `evil`, `overwrite`, `god`, - `ryo` and `xah-fly-keys`, etc. +- An indicator for modal editing state, including `evil`, `overwrite`, `god`, `ryo` and + `xah-fly-keys`, etc. - An indicator for remote host - An indicator for debug state - An indicator for current input method @@ -53,8 +53,8 @@ The `doom-modeline` was designed for minimalism, and offers: - An indicator for PDF page number with `pdf-tools` - An indicator for markdown/org preview with `grip` - An indicator for battery status with `fancy-battery` -- Truncated file name, file icon, buffer state and project name in buffer - information segment, which is compatible with `projectile` and `project` +- Truncated file name, file icon, buffer state and project name in buffer information segment, which + is compatible with `project`, `find-file-in-project` and `projectile`. - New mode-line for `Info-mode` buffers - New package mode-line for `paradox` - New mode-line for `helm` buffers diff --git a/doom-modeline-core.el b/doom-modeline-core.el index c591d67..fa9f47b 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -438,6 +438,7 @@ If the actual char height is larger, it respects the actual char height." ;; (declare-function face-remap-remove-relative 'face-remap) +(declare-function ffip-get-project-root-directory 'find-file-in-project) (declare-function project-roots 'project) (declare-function projectile-project-root 'projectile) @@ -682,6 +683,8 @@ If the actual char height is larger, it respects the actual char height." (ignore-errors (when-let ((project (project-current))) (expand-file-name (car (project-roots project)))))) + (and (fboundp 'ffip-get-project-root-directory) + (ignore-errors (ffip-get-project-root-directory))) (and (bound-and-true-p projectile-mode) (ignore-errors (projectile-project-root))) default-directory)))) diff --git a/doom-modeline.el b/doom-modeline.el index 9a14c21..b8010db 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -45,8 +45,8 @@ ;; - A workspace number segment for eyebrowse ;; - A perspective name segment for persp-mode ;; - A window number segment for winum and window-numbering -;; - An indicator for modal editing state, including evil, overwrite, god, ryo and -;; xah-fly-keys, etc. +;; - An indicator for modal editing state, including evil, overwrite, god, ryo +;; and xah-fly-keys, etc. ;; - An indicator for remote host ;; - An indicator for current input method ;; - An indicator for debug state @@ -60,7 +60,8 @@ ;; - An indicator for markdown/org preivews with grip ;; - An indicator for battery status with fancy-battery ;; - Truncated file name, file icon, buffer state and project name in buffer -;; information segment, which is compatible with projectile and project +;; information segment, which is compatible with project, find-file-in-project +;; and projectile ;; - New mode-line for Info-mode buffers ;; - New package mode-line for paradox ;; - New mode-line for helm buffers