diff --git a/.doom b/.doom new file mode 100644 index 000000000..e7485f033 --- /dev/null +++ b/.doom @@ -0,0 +1,98 @@ +"3.0.0-pre" +((name . doom) + (version . "3.0.0-pre") + (homepage . "https://doomemacs.org") + + (commit + (preset doom-conventional-commits) + (types "module") + (scopes "cli" "lib" + (module) + (release "modules") + (docs + "install" + (lambda (scope _plist) + "Allow any filename in docs/* as a scope for docs commits." + (member + scope (doom-files-in (doom-path (dir!) "../docs") + :match "\\.org$" + :map #'file-name-base)))) + (lambda (scope _plist) + "Only allow :CATEGORY or MODULE scopes if they actually exist." + (doom-glob + (dir!) "modules" (if (string-prefix-p ":" scope) + (format "%s" (substring scope 1)) + (format "*/%s" scope)))))) + + (make + (".github/CODEOWNERS" + "# Auto-generated by 'doom make .github/CODEOWNERS', do not edit it by hand.") + "*\t@doomemacs/maintainers" ; default until another takes precedence + ,@(cl-sort + (cl-loop for path in (doom-module-load-path (list doom-modules-dir)) + if (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)$" path) + collect (format "%s\t@doomemacs/%s-%s" + (substring (match-string 0 path) 1) + (match-string 1 path) + (match-string 2 path))) + #'string-lessp))) + + (publish + (targets "docs/index.org" "docs" "modules/*/README.org") + (env + (global-menus + ("± Suggest edits" . "doom-suggest-edit:") + ("? Help" + . ,(lambda! (&key title) + (cond ((equal title "Changelog") "doom-help-changelog:") + ((string-prefix-p ":" title) "doom-help-modules:") + ("doom-help:"))))) + (menus + (("docs/*.org" "modules/README.org") + (left ("← Back to index" . "doom-index:"))) + ("docs/index.org" + (left ("↖ FAQ" . "doom-faq:"))) + ("modules/*/README.org" + (left ("← Back to module index" . "doom-module-index:"))) + ("modules/*/*/README.org" + (left ("← Back to module index" . "doom-module-index:")) + (right ("↖ History" + . ,(lambda! (&key category module) + (format "doom-module-history:%s/%s" (doom-keyword-name category) module))) + ("! Issues" + . ,(lambda! (&key category module) + (format "doom-module-issues::%s %s" category module)))))))) + + (sources + (doom + (title . "Doom Core Modules") + (version . "25.01.0-pre") + (paths "lisp/" "lisp/modules/*/")) + (doom+ + (title . "Doom Official Modules") + (version . "25.01.0-pre") + (paths "modules/*/" "modules/*/*/")) + (doom++ + (title . "Doom Community Modules") + (version . "25.01.0-pre") + (paths "modules/*/" "modules/*/*/"))) + + (profiles + (test + (sources doom) + (modules :doom (cli +ci +buttercup)) + (packages))) + + (packages + (straight :host github + :repo "radian-software/straight.el" + :branch "develop" + :local-repo "straight.el" + :files ("straight*.el") + :pin "33fb4695066781c634ff1c3c81ba96e880deccf7") + ;; (elpaca :repo "https://github.com/progfolio/elpaca.git" + ;; :pin "34b1d1b19d24470758b62ab1d10ed70068186c12" + ;; :depth 1 + ;; :files (:defaults "elpaca-test.el" (:exclude "extensions")) + ;; :build (:not elpaca--activate-package)) + )) diff --git a/.doomrc b/.doomrc deleted file mode 100644 index 880fb896b..000000000 --- a/.doomrc +++ /dev/null @@ -1,55 +0,0 @@ -;;; .doomrc --- doom runtime config -*- mode: emacs-lisp; lexical-binding: t; -*- -;;; Commentary: -;;; Code: -(require 'doom) ; be silent, byte-compiler - -(after! doom-cli-ci - ;;; Commit linter types - (add-to-list 'doom-ci-commit-types 'module) - (add-to-list 'doom-ci-commit-scopeless-types 'module) - - ;;; Commit linter scopes - (add-to-list 'doom-ci-commit-scopes "cli") - (add-to-list 'doom-ci-commit-scopes "lib") - (add-to-list 'doom-ci-commit-scopes "docs") - (add-to-list 'doom-ci-commit-scopes '(docs "install" ci-check-docs-scope)) - (add-to-list 'doom-ci-commit-scopes #'ci-check-module-scope) - ;; DEPRECATED Will be removed once modules live in their own repo - (add-to-list 'doom-ci-commit-scopes '(release "modules"))) - -(after! doom-cli-make - ;;; Codeowners - ;; I will be the default owner for everything in the repo unless a later match - ;; takes precedence. - (add-to-list 'doom-make-codeowners "# The default owner(s) unless another takes precedence") - (add-to-list 'doom-make-codeowners '("*" . "@doomemacs/maintainers")) - ;; Module maintainers (see https://git.doomemacs.org/teams) - (add-to-list 'doom-make-codeowners "# Module maintainers") - (save-match-data - (setq doom-make-codeowners - (nreverse - (append doom-make-codeowners - (cl-sort - (cl-loop for path in (doom-module-load-path (list doom-modules-dir)) - if (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)$" path) - collect (cons (substring (match-string 0 path) 1) - (format "@doomemacs/%s-%s" - (match-string 1 path) - (match-string 2 path)))) - #'string-lessp :key #'car)))))) - -;;; Helpers -(defun ci-check-module-scope (scope _plist) - "Only allow :CATEGORY or MODULE scopes if they actually exist." - (doom-glob (dir!) "modules" (if (string-prefix-p ":" scope) - (format "%s" (substring scope 1)) - (format "*/%s" scope)))) - -(defun ci-check-docs-scope (scope _plist) - "Allow any filename in docs/* as a scope for docs commits." - (member - scope (doom-files-in (doom-path (dir!) "../docs") - :match "\\.org$" - :map #'file-name-base))) - -;;; .doomrc ends here diff --git a/bin/doom b/bin/doom index 0a0ec3c51..583d9a244 100755 --- a/bin/doom +++ b/bin/doom @@ -298,13 +298,13 @@ SEE ALSO: (defcli-group! :prefix (if (cdr key) (format "+%s" (cdr key))) (doom-load (file-name-sans-extension path)))))))) - ;; Allow per-project Doom settings in .doom files. + ;; Execute arbitrary CLI configuration in a local .doom.el file (let (doomrc) (cond ((setq doomrc (getenv "DOOMRC")) (load! doomrc default-directory)) - ((setq doomrc (locate-dominating-file default-directory ".doomrc")) - (load! ".doomrc" doomrc))))) + ((setq doomrc (locate-dominating-file default-directory ".doom.el")) + (load! ".doom.el" doomrc))))) ;; diff --git a/lisp/init.el b/lisp/init.el index 4fbd7a362..fc49c75ce 100644 --- a/lisp/init.el +++ b/lisp/init.el @@ -18,7 +18,6 @@ (add-to-list 'safe-local-variable-directories doom-user-dir) ;;; Support for Doom-specific file extensions -(add-to-list 'auto-mode-alist '("/\\.doom\\(?:project\\|module\\|profile\\)?\\'" . lisp-data-mode)) -(add-to-list 'auto-mode-alist '("/\\.doomrc\\'" . emacs-lisp-mode)) +(add-to-list 'auto-mode-alist '("/\\.doom\\(?:module\\|profile\\)?\\'" . lisp-data-mode)) ;;; init.el ends here