fix hgh/update-projects
This commit is contained in:
@@ -7,11 +7,12 @@
|
|||||||
'(apheleia-log-only-errors nil)
|
'(apheleia-log-only-errors nil)
|
||||||
'(custom-enabled-themes '(deeper-blue))
|
'(custom-enabled-themes '(deeper-blue))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(apheleia cape dart-mode diminish dotenv-mode dumber-jump evil
|
'(apheleia cape dart-mode diminish dotenv-mode dumber-jump embark evil
|
||||||
evil-collection evil-surround exec-path-from-shell
|
evil-collection evil-surround exec-path-from-shell
|
||||||
fish-mode ghostel jai-mode magit mise move-text
|
fish-mode forge ghostel jai-mode magit marginalia mise
|
||||||
multiple-cursors org-roam pgmacs terraform-mode
|
move-text multiple-cursors org-roam pgmacs
|
||||||
undo-tree yaml-mode yasnippet yasnippet-snippets))
|
terraform-mode undo-tree yaml-mode yasnippet
|
||||||
|
yasnippet-snippets))
|
||||||
'(package-vc-selected-packages
|
'(package-vc-selected-packages
|
||||||
'((pgmacs :url "https://github.com/emarsden/pgmacs.git")
|
'((pgmacs :url "https://github.com/emarsden/pgmacs.git")
|
||||||
(jai-mode :url "https://github.com/valignatev/jai-mode.git"))))
|
(jai-mode :url "https://github.com/valignatev/jai-mode.git"))))
|
||||||
|
|||||||
59
init.el
59
init.el
@@ -48,14 +48,19 @@
|
|||||||
speedbar-window-default-width 25
|
speedbar-window-default-width 25
|
||||||
speedbar-window-max-width 25
|
speedbar-window-max-width 25
|
||||||
duplicate-line-final-position -1
|
duplicate-line-final-position -1
|
||||||
duplicate-region-final-position -1)
|
duplicate-region-final-position -1
|
||||||
|
competions-detailed t
|
||||||
|
auth-sources '("~/.authinfo"))
|
||||||
|
|
||||||
|
(require 'project)
|
||||||
(setq project-switch-commands '((project-find-file "Find file" "f")
|
(setq project-switch-commands '((project-find-file "Find file" "f")
|
||||||
(project-find-dir "Find dir" "d")
|
(project-find-dir "Find dir" "d")
|
||||||
(project-dired "Dired" "D")
|
(project-dired "Dired" "D")
|
||||||
(project-find-regexp "ripgrep" "g")
|
(project-find-regexp "ripgrep" "g")
|
||||||
(magit-project-status "Magit" "m")))
|
(magit-project-status "Magit" "m")))
|
||||||
|
|
||||||
|
(define-key project-prefix-map "u" #'hgh/update-projects)
|
||||||
|
|
||||||
(when (file-directory-p (hgh/emacs-directory "work"))
|
(when (file-directory-p (hgh/emacs-directory "work"))
|
||||||
(load-file (hgh/emacs-directory "work/work.el"))
|
(load-file (hgh/emacs-directory "work/work.el"))
|
||||||
(add-to-list 'load-path (hgh/emacs-directory "work")))
|
(add-to-list 'load-path (hgh/emacs-directory "work")))
|
||||||
@@ -186,6 +191,11 @@
|
|||||||
(when (require 'evil nil 'noerror)
|
(when (require 'evil nil 'noerror)
|
||||||
(evil-global-set-key 'normal (kbd "<leader>gg") #'magit-status)))
|
(evil-global-set-key 'normal (kbd "<leader>gg") #'magit-status)))
|
||||||
|
|
||||||
|
(use-package forge
|
||||||
|
:ensure t
|
||||||
|
:after magit
|
||||||
|
:custom (forge-add-default-bindings nil))
|
||||||
|
|
||||||
(use-package multiple-cursors
|
(use-package multiple-cursors
|
||||||
:custom
|
:custom
|
||||||
(mc/always-run-for-all t)
|
(mc/always-run-for-all t)
|
||||||
@@ -313,3 +323,50 @@
|
|||||||
(global-mise-mode 1))
|
(global-mise-mode 1))
|
||||||
|
|
||||||
(use-package dotenv-mode)
|
(use-package dotenv-mode)
|
||||||
|
|
||||||
|
;; Enable rich annotations using the Marginalia package
|
||||||
|
(use-package marginalia
|
||||||
|
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
|
||||||
|
;; available in the *Completions* buffer, add it to the
|
||||||
|
;; `completion-list-mode-map'.
|
||||||
|
:bind (:map minibuffer-local-map
|
||||||
|
("M-A" . marginalia-cycle))
|
||||||
|
|
||||||
|
;; The :init section is always executed.
|
||||||
|
:init
|
||||||
|
|
||||||
|
;; Marginalia must be activated in the :init section of use-package such that
|
||||||
|
;; the mode gets enabled right away. Note that this forces loading the
|
||||||
|
;; package.
|
||||||
|
(marginalia-mode -1))
|
||||||
|
|
||||||
|
(use-package embark
|
||||||
|
:ensure t
|
||||||
|
|
||||||
|
:bind
|
||||||
|
(("M-'" . embark-act) ;; pick some comfortable binding
|
||||||
|
("C-;" . embark-dwim)) ;; good alternative: M-.
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
;; Optionally replace the key help with a completing-read interface
|
||||||
|
;; Show the Embark target at point via Eldoc. You may adjust the
|
||||||
|
;; Eldoc strategy, if you want to see the documentation from
|
||||||
|
;; multiple providers. Beware that using this can be a little
|
||||||
|
;; jarring since the message shown in the minibuffer can be more
|
||||||
|
;; than one line, causing the modeline to move up and down:
|
||||||
|
|
||||||
|
;; (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
|
||||||
|
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
|
||||||
|
|
||||||
|
;; Add Embark to the mouse context menu. Also enable `context-menu-mode'.
|
||||||
|
;; (context-menu-mode 1)
|
||||||
|
;; (add-hook 'context-menu-functions #'embark-context-menu 100)
|
||||||
|
|
||||||
|
:config
|
||||||
|
|
||||||
|
;; Hide the mode line of the Embark live/completions buffers
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||||
|
nil
|
||||||
|
(window-parameters (mode-line-format . none)))))
|
||||||
|
|||||||
11
utils.el
11
utils.el
@@ -20,7 +20,14 @@
|
|||||||
|
|
||||||
(defun hgh/update-projects ()
|
(defun hgh/update-projects ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(dolist (path '("/programming/projects/" "/programming/thirdparty/" "/programming/probe/"))
|
(dolist (path '("/programming/projects/"
|
||||||
|
"/programming/projects/worktrees"
|
||||||
|
"/programming/thirdparty/"
|
||||||
|
"/programming/probe/"))
|
||||||
(let ((projects-root (concat (getenv "HOME") path)))
|
(let ((projects-root (concat (getenv "HOME") path)))
|
||||||
|
(make-directory projects-root t)
|
||||||
(dolist (dir (directory-files projects-root t "^[^.]"))
|
(dolist (dir (directory-files projects-root t "^[^.]"))
|
||||||
(project-current t dir)))))
|
(when (file-directory-p dir)
|
||||||
|
(let ((pr (project--find-in-directory dir)))
|
||||||
|
(when pr (project-remember-project pr)))))))
|
||||||
|
(message "Project list updated."))
|
||||||
|
|||||||
Reference in New Issue
Block a user