From 95e591a144a44701b0255c6500685caca4b3cdce Mon Sep 17 00:00:00 2001 From: Madeleine Sydney Date: Thu, 16 Jan 2025 13:04:43 -0700 Subject: [PATCH] feat: Project management I might switch back to Projectile later. }:\ --- README.org | 11 ++++++- users/crumb/files.nix | 1 + users/crumb/programs/emacs/init.el | 1 + .../programs/emacs/modules/syd-keybinds.el | 17 +++++++--- .../programs/emacs/modules/syd-projects.el | 31 +++++++++++++++++++ 5 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 users/crumb/programs/emacs/modules/syd-projects.el diff --git a/README.org b/README.org index 4dae357..cb57609 100755 --- a/README.org +++ b/README.org @@ -166,7 +166,8 @@ Disassemble project-ideas.org and reading-list.org into a individual roam nodes. **** TODO Capture templates -*** TODO project.el +*** DONE project.el +CLOSED: [2025-01-16 Thu 18:19] *** TODO Workspaces @@ -204,6 +205,12 @@ Disassemble project-ideas.org and reading-list.org into a individual roam nodes. *** TODO Vertico repeat +*** TODO so-long-mode + +*** TODO Consult icons + +**** TODO compile-multi-all-the-icons + *** Language support **** TODO Clojure @@ -216,6 +223,8 @@ Disassemble project-ideas.org and reading-list.org into a individual roam nodes. **** TODO Elisp +*** IDEA Email? + *** IDEA =map!= macro *** IDEA Module system? diff --git a/users/crumb/files.nix b/users/crumb/files.nix index d80898f..f52952f 100644 --- a/users/crumb/files.nix +++ b/users/crumb/files.nix @@ -5,6 +5,7 @@ in { home.file."org".source = mutableSymlink "~/Dropbox/org"; + # TODO: Move to programs/age.nix. xdg.configFile."sops/age/keys.txt".source = mutableSymlink "/persist/vault/${config.home.username}/keys/melbourne"; diff --git a/users/crumb/programs/emacs/init.el b/users/crumb/programs/emacs/init.el index 5dbf6c6..2747915 100644 --- a/users/crumb/programs/emacs/init.el +++ b/users/crumb/programs/emacs/init.el @@ -21,6 +21,7 @@ (require 'syd-evil) (require 'syd-keybinds) (require 'syd-org) +(require 'syd-projects) (require 'syd-scratch) (require 'syd-smartparens) (require 'syd-ui) diff --git a/users/crumb/programs/emacs/modules/syd-keybinds.el b/users/crumb/programs/emacs/modules/syd-keybinds.el index 536e823..ff6bbe9 100644 --- a/users/crumb/programs/emacs/modules/syd-keybinds.el +++ b/users/crumb/programs/emacs/modules/syd-keybinds.el @@ -56,7 +56,7 @@ are active.") (defun syd-keybinds-initialise () (syd--initialise-leader) - ;;; Buffer + ;; Buffer (require 'syd-buffers) (general-def :prefix-map 'syd-leader-buffer-map @@ -70,13 +70,13 @@ are active.") "u" `("Save buffer as root" . ,#'syd/save-buffer-as-root) "r" `("Revert buffer" . ,#'revert-buffer)) - ;;; Search + ;; Search (general-def :prefix-map 'syd-leader-search-map "i" `("IMenu" . ,#'consult-imenu) "b" `("Search buffer" . ,#'syd/search-buffer)) - ;;; File + ;; File (require 'syd-file) (general-def :prefix-map 'syd-leader-file-map @@ -90,7 +90,7 @@ are active.") "U" `("Open this file as root" . ,#'syd/open-this-file-as-root) "y" `("Yank buffer path" . ,#'syd/yank-buffer-path)) - ;;; Window + ;; Window (require 'syd-window) (general-def :prefix-map 'syd-leader-window-maximise-map @@ -116,12 +116,19 @@ are active.") "C-r" `("Redo window change" . ,#'winner-redo) "m" `("Maximise" . ,syd-leader-window-maximise-map)) - ;;; Leader + (general-def + :prefix-map 'syd-leader-project-map + "C" `("Compile project" . ,#'project-compile)) + + ;; Leader (general-def :keymaps 'syd-leader-map "." #'find-file + "SPC" `("Find file in project" . ,#'project-find-file) "x" `("Open scratch buffer" . ,#'scratch-buffer) + "u" `("Universal argument" . ,#'universal-argument) "b" `("Buffer" . ,syd-leader-buffer-map) + "p" `("Project" . ,syd-leader-project-map) "w" `("Window" . ,syd-leader-window-map) "f" `("File" . ,syd-leader-file-map) "s" `("Search" . ,syd-leader-search-map) diff --git a/users/crumb/programs/emacs/modules/syd-projects.el b/users/crumb/programs/emacs/modules/syd-projects.el new file mode 100644 index 0000000..10775b7 --- /dev/null +++ b/users/crumb/programs/emacs/modules/syd-projects.el @@ -0,0 +1,31 @@ +;;; syd-projects.el -*- lexical-binding: t; -*- + +(require 'syd-constants) + +(use-package project + :custom ((project-list-file (file-name-concat syd-cache-dir + "known-projects")))) + +;; Projection provides a Projectile-like project management library atop +;; Emacs built-in project.el. It's more lightweight, while still featureful. +(use-package projection + ;; Enable the `projection-hook' feature. + :hook (after-init . global-projection-hook-mode) + ;; Require projections immediately after project.el. + :config + (with-eval-after-load 'project + (require 'projection))) + +;; Allow interactively selecting available compilation targets from the +;; current project type. +(use-package projection-multi + :after projection) + +;; Embark integration for projection-multi. +(use-package projection-multi-embark + :after (embark projection-multi) + ;; Add the projection set-command bindings to + ;; `compile-multi-embark-command-map'. + :config (projection-multi-embark-setup-command-map)) + +(provide 'syd-projects)