From 939fc0d3227706459e7ba74d53e2c0fd3d07ccba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 9 Aug 2024 20:49:18 -0400 Subject: [PATCH] feat: add project-vc config I intend to keep `project-vc-extra-root-markers` much lighter than what `projectile-project-root-files` ended up being, so I won't be transferring all the root markers. Ref: doomemacs/core#1 --- lisp/doom-projects.el | 12 ++++++++++-- modules/lang/cc/config.el | 2 ++ modules/lang/gdscript/config.el | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/doom-projects.el b/lisp/doom-projects.el index ad498b5da..25c1851ba 100644 --- a/lisp/doom-projects.el +++ b/lisp/doom-projects.el @@ -23,8 +23,16 @@ debian, and derivatives). On most it's 'fd'.") ;; ;;; Packages -(after! project - (setq project-list-file (file-name-concat doom-data-dir "projects"))) +(use-package! project + :defer t + :init + (setq project-list-file (file-name-concat doom-profile-state-dir "projects")) + :config + (add-to-list 'project-vc-extra-root-markers ".jj") + + ;; TODO: Advice or add command for project-wide `find-sibling-file'. + ) + ;; DEPRECATED: Will be replaced with project.el (use-package! projectile diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 3b15707d6..e69e28ec2 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -303,6 +303,8 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e :defer t :init (defvar ccls-sem-highlight-method 'font-lock) + (after! project + (add-to-list 'project-vc-ignores "^\\.ccls-cache$")) ;; DEPRECATED: Remove when projectile is replaced with project.el (after! projectile (add-to-list 'projectile-globally-ignored-directories "^.ccls-cache$") diff --git a/modules/lang/gdscript/config.el b/modules/lang/gdscript/config.el index 076171ca6..f8ee13ec4 100644 --- a/modules/lang/gdscript/config.el +++ b/modules/lang/gdscript/config.el @@ -1,5 +1,8 @@ ;;; lang/gdscript/config.el -*- lexical-binding: t; -*- +(after! project + (add-to-list 'project-vc-extra-root-markers "project.godot")) + ;; DEPRECATED: Remove when projectile is replaced with project.el (after! projectile (add-to-list 'projectile-project-root-files "project.godot"))