-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Describe
When i open file in subfolder within the project, doom-modeline considering this subfolder as project root, instead of actual root.
Steps and Expected
Project with subdirectory with some source files inside this subdir.
Project's root contains .projectile file. Also this project is svn repository.
Doom modeline path truncation set to truncate-with-project
Open file "project/subfolder/some_file.py"
Expected in modeline: "project/s/some_file.py"
Actually: "subfolder/some_file.py"
Environment:
- OS: Windows
- Version 7
- Package version 20190918.1510
Additional context:
I temporarily fix it on my install by changing order of root detection functions:
(defun doom-modeline-project-root ()
"Get the path to the root of your project.
Return `default-directory' if no project was found."
(or doom-modeline-project-root
(setq doom-modeline-project-root
(or (and (bound-and-true-p projectile-mode)
(ignore-errors (projectile-project-root)))
(and (fboundp 'project-current)
(ignore-errors
(when-let ((project (project-current)))
(expand-file-name (car (project-roots project))))))
(and (fboundp 'ffip-get-project-root-directory)
(let ((inhibit-message t))
(ignore-errors (ffip-get-project-root-directory))))
default-directory))))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers