Skip to content

Commit

Permalink
feat(prog): add citre for Universal Tags (ctags) support
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 21, 2024
1 parent f892550 commit 6bf0f8b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions modules/me-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,33 @@
(keymap-set combobulate-key-map "M-S-<left>" #'combobulate-yeet-forward)
(keymap-set combobulate-key-map "M-S-<down>" #'combobulate-yoink-forward))

(use-package citre
:straight t
:after minemacs-first-file
:demand t
:custom
(citre-project-root-function #'+citre-recursive-project-root)
:init
(defvar +citre-recursive-root-project-detection-files '(".tags/" ".repo/" ".citre_root"))
:config
(defun +citre-recursive-project-root ()
"Search recursively until we find one of `+citre-recursive-root-project-detection-files'.
Fall back to the default `citre--project-root'."
(or
(let ((dir (buffer-file-name)))
(catch 'root
(while dir
(when (cl-some #'file-exists-p (mapcar (+apply-partially-right #'expand-file-name dir) +citre-recursive-root-project-detection-files))
(throw 'root dir))
(setq dir (file-name-parent-directory dir)))))
;; Fall back to the default detection!
(citre--project-root))))

(use-package citre-config
:straight citre
:after citre
:demand t)

(use-package consult-eglot
:straight t
:after consult eglot
Expand Down

0 comments on commit 6bf0f8b

Please sign in to comment.