Skip to content

Commit

Permalink
💥 Remove :feature category
Browse files Browse the repository at this point in the history
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
  • Loading branch information
hlissner committed Apr 24, 2019
1 parent 52eed89 commit 77e4cc4
Show file tree
Hide file tree
Showing 193 changed files with 304 additions and 303 deletions.
2 changes: 1 addition & 1 deletion core/autoload/help.el
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ selection of all minor-modes, active or not."
(defun doom/describe-module (category module)
"Open the documentation of CATEGORY MODULE.
CATEGORY is a keyword and MODULE is a symbol. e.g. :feature and 'evil.
CATEGORY is a keyword and MODULE is a symbol. e.g. :editor and 'evil.
Automatically selects a) the module at point (in private init files), b) the
module derived from a `featurep!' or `require!' call, c) the module that the
Expand Down
31 changes: 21 additions & 10 deletions core/core-modules.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,32 @@
(defconst doom-obsolete-modules
'((:feature (version-control (:emacs vc) (:ui vc-gutter))
(spellcheck (:tools flyspell))
(syntax-checker (:tools flycheck)))
(syntax-checker (:tools flycheck))
(evil (:editor evil))
(snippets (:editor snippets))
(file-templates (:editor file-templates))
(workspaces (:ui workspaces))
(eval (:tools eval))
(lookup (:tools lookup))
(debugger (:tools debugger)))
(:tools (rotate-text (:editor rotate-text)))
(:emacs (electric-indent (:emacs electric))
(hideshow (:editor fold)))
(:ui (doom-modeline (:ui modeline)))
(:ui (fci (:ui fill-column)))
(:ui (evil-goggles (:ui ophints))))
"An alist of deprecated modules, mapping deprecated modules to an optional new
location (which will create an alias). Each CAR and CDR is a (CATEGORY .
MODULES). E.g.
(:ui (doom-modeline (:ui modeline))
(fci (:ui fill-column))
(evil-goggles (:ui ophints))))
"A tree alist that maps deprecated modules to their replacement(s).
((:emacs . electric-indent) . (:emacs electric))
((:feature . version-control) (:emacs vc) (:ui . vc-gutter))
Each entry is a three-level tree. For example:
A warning will be put out if these deprecated modules are used.")
(:feature (version-control (:emacs vc) (:ui vc-gutter))
(spellcheck (:tools flyspell))
(syntax-checker (:tools flycheck)))
This marks :feature version-control, :feature spellcheck and :feature
syntax-checker modules obsolete. e.g. If :feature version-control is found in
your `doom!' block, a warning is emitted before replacing it with :emacs vc and
:ui vc-gutter.")

(defvar doom--current-module nil)
(defvar doom--current-flags nil)
Expand Down
2 changes: 1 addition & 1 deletion core/core-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ It is recommended you don't set specify a font-size, as to inherit `doom-font's
size.")

(defvar doom-unicode-font nil
"Fallback font for unicode glyphs. Is ignored if :feature unicode is active.
"Fallback font for unicode glyphs. Is ignored if :ui unicode is active.
Expects either a `font-spec', font object, a XFT font string or XLFD string. See
`doom-font' for examples.
Expand Down
20 changes: 9 additions & 11 deletions init.example.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@
;; More information about these modules (and what flags they support) can be
;; found in modules/README.org.

(doom! :feature
;;debugger ; FIXME stepping through code, to help you add bugs
eval ; run code, run (also, repls)
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
(lookup ; helps you navigate your code and documentation
+docsets) ; ...or in Dash docsets locally
snippets ; my elves. They type so I don't have to
workspaces ; tab emulation, persistence & separate workspaces

:completion
(doom! :completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
Expand Down Expand Up @@ -46,14 +36,18 @@
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces

:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;lispy ; vim for lisp, for people who dont like vim
multiple-cursors ; editing in many places at once
;;parinfer ; turn lisp into python, sort of
rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to

:emacs
(dired ; making dired pretty [functional]
Expand All @@ -68,13 +62,17 @@

:tools
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
eval ; run code, run (also, repls)
flycheck ; tasing you for every semicolon you forget
;;flyspell ; tasing you for misspelling mispelling
;;gist ; interacting with github gists
(lookup ; helps you navigate your code and documentation
+docsets) ; ...or in Dash docsets locally
;;lsp
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs
Expand Down
26 changes: 11 additions & 15 deletions modules/README.org
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#+TITLE: Doom Modules

* Table of Contents :TOC:noexport:
- [[#feature][:feature]]
- [[#completion][:completion]]
- [[#ui][:ui]]
- [[#editor][:editor]]
Expand All @@ -12,19 +11,9 @@
- [[#collab][:collab]]
- [[#config][:config]]

* :feature
Broad modules that bring essential IDE functionality to Emacs.

+ debugger: A (nigh-)universal debugger in Emacs
+ [[file:feature/eval/README.org][eval]]: REPL & code evaluation support for a variety of languages
+ [[file:feature/evil/README.org][evil]] =+everywhere=: Vim in Emacs
+ [[file:feature/file-templates/README.org][file-templates]]: Auto-inserted templates in blank new files
+ [[file:feature/lookup/README.org][lookup]] =+docsets=: Universal jump-to & documentation lookup backend
+ [[file:feature/snippets/README.org][snippets]]: A templating system for Emacs for lazy typers (aka programmers)
+ [[file:feature/workspaces/README.org][workspaces]]: Isolated workspaces

* :completion
Swappable completion modules for quickly narrowing down lists of candidates.
Modules that provide new interfaces or frameworks for completion, including code
completion.

+ [[file:completion/company/README.org][company]] =+auto +childframe=: The ultimate code completion backend
+ helm =+fuzzy +childframe=: *Another* search engine for love and life
Expand Down Expand Up @@ -53,19 +42,23 @@ Aesthetic modules that affect the Emacs interface or user experience.
+ vc-gutter:
+ vi-tilde-fringe:
+ [[file:ui/window-select/README.org][window-select]]:
+ [[file:ui/workspaces/README.org][workspaces]]: Isolated workspaces

* :editor
Modules that affect and augment your ability to write and edit text.
Modules that affect and augment your ability to manipulate or insert text.

+ [[file:editor/evil/README.org][evil]] =+everywhere=: transforms Emacs into Vim
+ [[file:editor/file-templates/README.org][file-templates]]: Auto-inserted templates in blank new files
+ [[file:editor/fold/README.org][fold]]: universal code folding
+ [[file:editor/format/README.org][format]] =+onsave=:
+ [[file:editor/lispy/README.org][lispy]]:
+ multiple-cursors:
+ [[file:editor/parinfer/README.org][parinfer]]:
+ rotate-text:
+ [[file:editor/snippets/README.org][snippets]]: Snippet expansion for lazy typists

* :emacs
Modules that reconfigure packages or features built into Emacs
Modules that reconfigure or augment packages or features built into Emacs.

+ dired =+ranger +icons=:
+ electric:
Expand All @@ -78,12 +71,15 @@ Modules that reconfigure packages or features built into Emacs
Small modules that give Emacs access to external tools & services.

+ ansible:
+ debugger: A (nigh-)universal debugger in Emacs
+ docker:
+ [[file:tools/editorconfig/README.org][editorconfig]]:
+ [[file:tools/ein/README.org][ein]]:
+ [[file:tools/eval/README.org][eval]]: REPL & code evaluation support for a variety of languages
+ flycheck: Live error/warning highlights
+ flyspell: Spell checking
+ gist:
+ [[file:tools/lookup/README.org][lookup]] =+docsets=: Universal jump-to & documentation lookup backend
+ [[file:tools/lsp/README.org][lsp]]:
+ macos:
+ magit:
Expand Down
4 changes: 2 additions & 2 deletions modules/app/calendar/autoload.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(defun =calendar ()
"Activate (or switch to) `calendar' in its workspace."
(interactive)
(if (featurep! :feature workspaces)
(if (featurep! :ui workspaces)
(progn
(+workspace-switch "Calendar" t)
(doom/switch-to-scratch-buffer)
Expand All @@ -28,7 +28,7 @@
(defun +calendar/quit ()
"TODO"
(interactive)
(if (featurep! :feature workspaces)
(if (featurep! :ui workspaces)
(+workspace/delete "Calendar")
(doom-kill-matching-buffers "^\\*cfw:")
(set-window-configuration +calendar--wconf)
Expand Down
2 changes: 1 addition & 1 deletion modules/app/email/autoload/evil.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;; app/email/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###if (featurep! :editor evil)

;;;###autoload
(defun +email/mark (&optional beg end)
Expand Down
2 changes: 1 addition & 1 deletion modules/app/irc/autoload/irc.el
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
If INHIBIT-WORKSPACE (the universal argument) is non-nil, don't spawn a new
workspace for it."
(interactive "P")
(cond ((and (featurep! :feature workspaces)
(cond ((and (featurep! :ui workspaces)
(+workspace-exists-p +irc--workspace-name))
(+workspace-switch +irc--workspace-name))
((not (+irc-setup-wconf inhibit-workspace))
Expand Down
4 changes: 2 additions & 2 deletions modules/app/notmuch/autoload.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
(defun =notmuch ()
"Activate (or switch to) `notmuch' in its workspace."
(interactive)
(unless (featurep! :feature workspaces)
(user-error ":feature workspaces is required, but disabled"))
(unless (featurep! :ui workspaces)
(user-error ":ui workspaces is required, but disabled"))
(condition-case-unless-debug e
(progn
(+workspace-switch "*MAIL*" t)
Expand Down
2 changes: 1 addition & 1 deletion modules/app/rss/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ easier to scroll through.")
(define-key! elfeed-show-mode-map
[remap next-buffer] #'+rss/next
[remap previous-buffer] #'+rss/previous))
(when (featurep! :feature evil +everywhere)
(when (featurep! :editor evil +everywhere)
(evil-define-key 'normal elfeed-search-mode-map
"q" #'elfeed-kill-buffer
"r" #'elfeed-search-update--force
Expand Down
6 changes: 3 additions & 3 deletions modules/app/twitter/autoload.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ that works with the feature/popup module."
(interactive "P")
(condition-case _
(progn
(if (and (not arg) (featurep! :feature workspaces))
(if (and (not arg) (featurep! :ui workspaces))
(+workspace/new +twitter-workspace-name)
(setq +twitter--old-wconf (current-window-configuration))
(delete-other-windows)
Expand All @@ -52,15 +52,15 @@ that works with the feature/popup module."
(when (eq major-mode 'twittering-mode)
(twittering-kill-buffer)
(cond ((one-window-p) (+twitter/quit-all))
((featurep! :feature workspaces)
((featurep! :ui workspaces)
(+workspace/close-window-or-workspace))
((delete-window)))))

;;;###autoload
(defun +twitter/quit-all ()
"Close all open `twitter-mode' buffers and the associated workspace, if any."
(interactive)
(when (featurep! :feature workspaces)
(when (featurep! :ui workspaces)
(+workspace/delete +twitter-workspace-name))
(when +twitter--old-wconf
(set-window-configuration +twitter--old-wconf)
Expand Down
2 changes: 1 addition & 1 deletion modules/app/twitter/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
[remap twittering-kill-buffer] #'+twitter/quit
[remap delete-window] #'+twitter/quit
[remap +workspace/close-window-or-workspace] #'+twitter/quit)
(when (featurep! :feature evil +everywhere)
(when (featurep! :editor evil +everywhere)
(define-key! twittering-mode-map
[remap evil-window-delete] #'+twitter/quit
"f" #'twittering-favorite
Expand Down
2 changes: 1 addition & 1 deletion modules/completion/company/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
company-echo-metadata-frontend))
:config
(add-hook 'company-mode-hook #'+company|init-backends)
(when (featurep! :feature evil)
(when (featurep! :editor evil)
(add-hook 'company-mode-hook #'evil-normalize-keymaps))
(global-company-mode +1))

Expand Down
2 changes: 1 addition & 1 deletion modules/completion/helm/autoload/evil.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;;; completion/helm/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###if (featurep! :editor evil)

;;
;; Project searching
Expand Down
8 changes: 4 additions & 4 deletions modules/completion/helm/autoload/helm.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"A version of `helm-buffers-list' with its buffer list restricted to the
current workspace."
(interactive)
(unless (featurep! :feature workspaces)
(user-error "This command requires the :feature workspaces module"))
(unless (featurep! :ui workspaces)
(user-error "This command requires the :ui workspaces module"))
(with-no-warnings
(with-persp-buffer-list nil (helm-buffers-list))))

Expand All @@ -34,8 +34,8 @@ current workspace."
"A version of `helm-mini' with its buffer list restricted to the current
workspace."
(interactive)
(unless (featurep! :feature workspaces)
(user-error "This command requires the :feature workspaces module"))
(unless (featurep! :ui workspaces)
(user-error "This command requires the :ui workspaces module"))
(with-no-warnings
(with-persp-buffer-list nil (helm-mini))))

Expand Down
2 changes: 1 addition & 1 deletion modules/completion/helm/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ be negative.")
;; disable special behavior for left/right, M-left/right keys.
helm-ff-lynx-style-map nil)

(when (featurep! :feature evil +everywhere)
(when (featurep! :editor evil +everywhere)
(setq helm-default-prompt-display-function #'+helm--set-prompt-display))

:init
Expand Down
2 changes: 1 addition & 1 deletion modules/completion/ivy/autoload/evil.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;; completion/ivy/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###if (featurep! :editor evil)

;;;###autoload (autoload '+ivy:swiper "completion/ivy/autoload/evil" nil t)
(evil-define-command +ivy:swiper (&optional search)
Expand Down
2 changes: 1 addition & 1 deletion modules/completion/ivy/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ immediately runs it on the current candidate (ending the ivy session)."
;;
;; Evil key fixes

(map! :when (featurep! :feature evil +everywhere)
(map! :when (featurep! :editor evil +everywhere)
:after ivy
:map (ivy-occur-mode-map ivy-occur-grep-mode-map)
:m "j" #'ivy-occur-next-line
Expand Down
2 changes: 1 addition & 1 deletion modules/config/default/+emacs-bindings.el
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
(:prefix ("q" . "quit/restart")
:desc "Quit Emacs" "q" #'kill-emacs
:desc "Save and quit Emacs" "Q" #'save-buffers-kill-terminal
(:when (featurep! :feature workspaces)
(:when (featurep! :ui workspaces)
:desc "Quit Emacs & forget session" "X" #'+workspace/kill-session-and-quit)
:desc "Restart & restore Emacs" "r" #'doom/restart-and-restore
:desc "Restart Emacs" "R" #'doom/restart)
Expand Down
Loading

0 comments on commit 77e4cc4

Please sign in to comment.