diff --git a/modules/editor/README.org b/modules/editor/README.org index 95fd22023..3aec9067c 100644 --- a/modules/editor/README.org +++ b/modules/editor/README.org @@ -1,10 +1,8 @@ -← [[doom-module-index:][Back to module index]] ↙ [[doom-changelog-search:::editor nil][Changelog]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +← [[doom-module-index:][Back to module index]] ↖ [[doom-module-source:editor][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] -------------------------------------------------------------------------------- -#+TITLE: :editor -#+CREATED: July 30, 2021 -#+SINCE: v21.12.0 -#+SETUPFILE: ../../docs/.setupfile.org +#+TITLE: :editor +#+CREATED: July 30, 2021 +#+SINCE: 21.12.0 * Description -For modules concerned with the insertion, manipulation, and general editing of -text. Amen. +For modules concerned with the insertion and editing of text. Amen. diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 42470287d..b2407a9ac 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -1,114 +1,115 @@ -#+TITLE: editor/evil -#+DATE: February 2, 2017 -#+SINCE: v2.0 -#+STARTUP: inlineimages nofold +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor evil][Issues]] ↖ [[doom-module-source:editor/evil][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor evil +#+SUBTITLE: The text editor Emacs was missing +#+CREATED: April 08, 2020 +#+SINCE: 2.0.0 -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] - - [[#hacks][Hacks]] -- [[#prerequisites][Prerequisites]] -- [[#features][Features]] - - [[#ported-vim-plugins][Ported vim plugins]] - - [[#custom-text-objects][Custom Text Objects]] - - [[#custom-ex-commands][Custom Ex Commands]] -- [[#configuration][Configuration]] - - [[#removing-evil-mode][Removing evil-mode]] - - [[#restoring-old-substitution-behavior-on-ss][Restoring old substitution behavior on s/S]] - - [[#restoring-old-y-behavior-yank-the-whole-line][Restoring old Y behavior (yank the whole line)]] - - [[#disabling-cursor-movement-when-exiting-insert-mode][Disabling cursor movement when exiting insert mode]] +* Description :unfold: +This holy module brings the Vim editing model to Emacs. -* Description -This holy module brings the vim experience to Emacs. +** Maintainers +- [[doom-user:][@hlissner]] -** Module Flags -+ =+everywhere= Enables evilified keybinds everywhere possible. Uses the - [[https://github.com/emacs-evil/evil-collection][evil-collection]] plugin as a foundation. +[[doom-contrib-maintainer:][Become a maintainer?]] -** Plugins -+ [[https://github.com/emacs-evil/evil][evil]] -+ [[https://github.com/wcsmith/evil-args][evil-args]] -+ [[https://github.com/PythonNut/evil-easymotion][evil-easymotion]] -+ [[https://github.com/cute-jumper/evil-embrace.el][evil-embrace]] -+ [[https://github.com/syl20bnr/evil-escape][evil-escape]] -+ [[https://github.com/Dewdrops/evil-exchange][evil-exchange]] -+ [[https://github.com/TheBB/evil-indent-plus][evil-indent-plus]] -+ [[https://github.com/edkolev/evil-lion][evil-lion]] -+ [[https://github.com/redguardtoo/evil-nerd-commenter][evil-nerd-commentary]] -+ [[https://github.com/cofi/evil-numbers][evil-numbers]] -+ [[https://github.com/noctuid/evil-textobj-anyblock][evil-textobj-anyblock]] -+ [[https://github.com/hlissner/evil-snipe][evil-snipe]] -+ [[https://github.com/emacs-evil/evil-surround][evil-surround]] -+ [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]] -+ [[https://github.com/bling/evil-visualstar][evil-visualstar]] -+ [[https://github.com/ninrod/exato][exato]] -+ [[https://github.com/emacs-evil/evil-collection][evil-collection]]* -+ [[https://www.github.com/rgrinberg/evil-quick-diff][evil-quick-diff]] +** Module flags +- +everywhere :: + Enable evilified keybinds everywhere possible. Uses the [[https://github.com/emacs-evil/evil-collection][evil-collection]] plugin + as a foundation. + +** Packages +- [[doom-package:][evil]] +- [[doom-package:][evil-args]] +- [[doom-package:][evil-collection]] if [[doom-module:][+everywhere]] +- [[doom-package:][evil-easymotion]] +- [[doom-package:][evil-embrace]] +- [[doom-package:][evil-escape]] +- [[doom-package:][evil-exchange]] +- [[doom-package:][evil-indent-plus]] +- [[doom-package:][evil-lion]] +- [[doom-package:][evil-nerd-commentary]] +- [[doom-package:][evil-numbers]] +- [[doom-package:][evil-quick-diff]] +- [[doom-package:][evil-snipe]] +- [[doom-package:][evil-surround]] +- [[doom-package:][evil-textobj-anyblock]] +- [[doom-package:][evil-vimish-fold]] +- [[doom-package:][evil-visualstar]] +- [[doom-package:][exato]] ** Hacks -+ The o/O keys will respect and continue commented lines (can be disabled by +- The o/O keys will respect and continue commented lines (can be disabled by setting ~+evil-want-o/O-to-continue-comments~ to ~nil~). -+ In visual mode, =*= and =#= will search for the current selection instead of - the word-at-point. -+ The ~:g[lobal]~ ex command has been modified to highlight matches. -+ More of vim's filename modifiers are supported in ex commands (like ~:p~, +- In visual mode, [[kbd:][*]] and [[kbd:][#]] will search for the current selection instead of the + word-at-point. +- The ~:g[lobal]~ ex command has been modified to highlight matches. +- More of vim's filename modifiers are supported in ex commands (like ~:p~, ~:p:h~ or ~:t~) than vanilla evil-mode offers. -+ A custom filename modifier is available in Doom: ~:P~, which expands to the +- A custom filename modifier is available in Doom: ~:P~, which expands to the project root (throws an error if not in a project). -* Prerequisites -This module has no external prerequisites. +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote -* Features ** Ported vim plugins The following vim plugins have been ported to evil: -| Vim Plugin | Emacs Plugin | Keybind(s) | -|-----------------------+--------------------------------+--------------------------------------------| -| vim-commentary | evil-nerd-commenter | omap =gc= | -| vim-easymotion | evil-easymotion | omap =gs= | -| vim-lion | evil-lion | omap =gl= / =gL= | -| vim-seek or vim-sneak | evil-snipe | mmap =s= / =S=, omap =z= / =Z= & =x= / =X= | -| vim-surround | evil-embrace and evil-surround | vmap =S=, omap =ys= | -| vim-unimpaired | (provided by Doom) | [[https://github.com/hlissner/doom-emacs/blob/develop/modules/editor/evil/config.el#L413-L460][see the list]] | +| Vim Plugin | Emacs Plugin | Keybind(s) | +|-----------------------+--------------------------------+--------------------------------| +| vim-commentary | evil-nerd-commenter | omap [[kbd:][gc]] | +| vim-easymotion | evil-easymotion | omap [[kbd:][gs]] | +| vim-lion | evil-lion | omap [[kbd:][gl]] / [[kbd:][gL]] | +| vim-seek or vim-sneak | evil-snipe | mmap [[kbd:][s]] / [[kbd:][S]], omap [[kbd:][z]] / [[kbd:][Z]] & [[kbd:][x]] / [[kbd:][X]] | +| vim-surround | evil-embrace and evil-surround | vmap [[kbd:][S]], omap [[kbd:][ys]] | +| vim-unimpaired | (provided by Doom) | [[https://github.com/hlissner/doom-emacs/blob/develop/modules/editor/evil/config.el#L413-L460][see the list]] | This module has also ported vim-unimpaired keybinds to Emacs. In other modules: -+ The tools/neotree & tools/treemacs modules provide a =NERDTree= equivalent. -+ The editor/multiple-cursors module contains functionality equal to the +- The [[doom-module:][:ui neotree]] & [[doom-module:][:ui treemacs]] modules provide a =NERDTree= equivalent. +- The [[doom-module:][:editor multiple-cursors]] module contains functionality equal to the following vim plugins: - + evil-multiedit => vim-multiedit - + evil-mc => vim-multiple-cursors + - [[doom-package:][evil-multiedit]] => [[github:hlissner/vim-multiedit][vim-multiedit]] + - [[doom-package:][evil-mc]] => [[https://github.com/terryma/vim-multiple-cursors][vim-multiple-cursors]] ** Custom Text Objects This module provides a couple extra text objects, along with the built-in ones. For posterity, here are the built-in ones: -+ =w W= words -+ =s= sentences -+ =p= paragraphs -+ =b= parenthesized blocks -+ =b ( ) { } [ ] < >= braces, parentheses and brackets -+ =' " `= quotes -+ =t= tags -+ =o= symbols +- [[kbd:][w W]] words +- [[kbd:][s]] sentences +- [[kbd:][p]] paragraphs +- [[kbd:][b]] parenthesized blocks +- [[kbd:][b ( ) { } [ ] < >]] braces, parentheses and brackets +- [[kbd:][' " `]] quotes +- [[kbd:][t]] tags +- [[kbd:][o]] symbols And these are text objects added by this module: - -+ =a= C-style function arguments (provided by ~evil-args~) -+ =B= any block delimited by braces, parentheses or brackets (provided by +- [[kbd:][a]] C-style function arguments (provided by ~evil-args~) +- [[kbd:][B]] any block delimited by braces, parentheses or brackets (provided by ~evil-textobj-anyblock~) -+ =c= Comments -+ =f= For functions (but relies on the major mode to have sane definitions for +- [[kbd:][c]] Comments +- [[kbd:][f]] For functions (but relies on the major mode to have sane definitions for ~beginning-of-defun-function~ and ~end-of-defun-function~) -+ =g= The entire buffer -+ =i j k= by indentation (=k= includes one line above; =j= includes one line - above and below) (provided by ~evil-indent-plus~) -+ =q= For quotes (any kind) -+ =u= For URLs -+ =x= XML attributes (provided by ~exato~) +- [[kbd:][g]] The entire buffer +- [[kbd:][i j k]] by indentation ([[kbd:][k]] includes one line above; [[kbd:][j]] includes one line above and + below) (provided by ~evil-indent-plus~) +- [[kbd:][q]] For quotes (any kind) +- [[kbd:][u]] For URLs +- [[kbd:][x]] XML attributes (provided by ~exato~) ** Custom Ex Commands | Ex Command | Description | @@ -137,64 +138,71 @@ And these are text objects added by this module: | ~:rm[!] [PATH]~ | Delete the current buffer's file and buffer | | ~:tcd[!]~ | Send =cd X= to tmux. X = the project root if BANG, X = ~default-directory~ otherwise | -* Configuration -** Removing evil-mode -You must do two things to remove Evil: - -1. Remove =:editor evil= from =~/.doom.d/init.el=, -2. Run ~doom sync~ to clean up lingering dependencies and regenerate your - autoloads files. -3. [OPTIONAL] You may want to assign new values to ~doom-leader-alt-key~ and - ~doom-localleader-alt-key~. These are bound to =C-c= and =C-c l= by default. - +* TODO Configuration #+begin_quote -Ignore ~doom-leader-key~ and ~doom-localleader-key~, they don't apply to -non-evil sessions. + 🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] #+end_quote -Evil-specific configuration and keybindings (defined with ~map!~) will be -ignored without =:editor evil= present (and omitted when byte-compiling). +* Troubleshooting +[[doom-report:][Report an issue?]] -Keep in mind that, at the time of this writing, Doom was designed by a vimmer, -for vimmers. Little consideration has been put into designing a keybind scheme -for vanilla Emacs users (though it's being worked on!). +** Can't access the universal argument key ([[kbd:][C-u]]) +For maximum Vim emulation, this module commandeers the C-u key for scrolling (as +it does in Vim). The same goes for [[kbd:][C-u]] in insert mode (which deletes to BOL). In +both cases the universal argument has been moved to [[kbd:][ u]]. -That means that much of Doom's functionality will be orphaned in an evil-less -setup. You'll have to set your own keybinds. +To undo this, use: +#+begin_src emacs-lisp +;; add to $DOOMDIR/config.el +(setq! evil-want-C-u-scroll nil + evil-want-C-u-delete nil) +#+end_src -I suggest studying [[file:../../config/default/+emacs-bindings.el][config/default/+emacs-bindings.el]] to see what keybinds are -available for non-evil users. Otherwise, you may find inspiration [[file:../../../docs/example_configs.org][on the example -Doom configurations page]]. - -** Restoring old substitution behavior on s/S -Doom replaces the =s= and =S= keys with the =evil-snipe= package (a port of +** The [[kbd:][s]]/[[kbd:][S]] keys behave differently from Vim +Doom replaces the [[kbd:][s]] and [[kbd:][S]] keys with the [[doom-package:][evil-snipe]] package (a port of vim-seek/vim-sneak for 2-character versions of f/F/t/T). To disable evil-snipe on s/S, you can either: - 1. Disable ~evil-snipe-mode~ by adding ~(remove-hook 'doom-first-input-hook #'evil-snipe-mode)~ to =$DOOMDIR/config.el=, -2. Or disable =evil-snipe= completely with ~(package! evil-snipe :disable t)~ +2. Or disable [[doom-package:][evil-snipe]] completely with ~(package! evil-snipe :disable t)~ added to =$DOOMDIR/packages.el=, but this will also disable incremental highlighting for the f/F/t/T motions keys. -3. Or use =cl= and =cc=, respectively; they do the same thing. -** Restoring old Y behavior (yank the whole line) -Doom changes the behavior of the =Y= key in normal mode to yank-to-EOL -(equivalent to =y$=). This was to make it consistent with the =C= and =D= -capital operators, and because it was redundant with =yy=, which is easier to -type than =y$=. +3. Or use [[kbd:][cl]] and [[kbd:][cc]], respectively; they do the same thing. + +** The [[kbd:][Y]] key behaves differently from Vim (should yank the whole line) +Doom changes the behavior of the [[kbd:][Y]] key in normal mode to yank-to-EOL (equivalent +to [[kbd:][y$]]). This was to make it consistent with the [[kbd:][C]] and [[kbd:][D]] capital operators, and +because it was redundant with [[kbd:][yy]], which is easier to type than [[kbd:][y$]]. If you prefer the old behavior, it can be reversed with: - -#+BEGIN_SRC elisp -;; add to ~/.doom.d/config.el +#+begin_src emacs-lisp +;; add to $DOOMDIR/config.el (setq! evil-want-Y-yank-to-eol nil) -#+END_SRC -** Disabling cursor movement when exiting insert mode -Vim (and evil) move the cursor one character back when exiting insert mode. If -you prefer that it didn't, set: +#+end_src -#+BEGIN_SRC elisp -;; add to ~/.doom.d/config.el -(setq evil-move-cursor-back nil) -#+END_SRC +* Frequently asked questions +[[doom-suggest-faq:][Ask a question?]] + +** How do I remove evil? +:PROPERTIES: +:ID: f3925da6-5f0b-4d11-aa08-7bb58bea1982 +:END: +1. [[id:01cffea4-3329-45e2-a892-95a384ab2338][Disable this module]]. +2. Run ~$ doom sync~ to clean up lingering dependencies and regenerate your + autoloads files. +3. [OPTIONAL] Change ~doom-leader-alt-key~ and ~doom-localleader-alt-key~. These + are bound to [[kbd:][C-c]] and [[kbd:][C-c l]] by default. + +#+begin_quote + 🚧 Ignore ~doom-leader-key~ and ~doom-localleader-key~, they don't apply to + non-evil sessions. +#+end_quote + +Evil-specific configuration and keybindings (defined with ~map!~) will be +ignored without [[doom-module:][:editor evil]] present (and omitted when byte-compiling). + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/file-templates/README.org b/modules/editor/file-templates/README.org index 9a195f6e5..91ff5a572 100644 --- a/modules/editor/file-templates/README.org +++ b/modules/editor/file-templates/README.org @@ -1,83 +1,98 @@ -#+TITLE: editor/file-templates -#+DATE: February 11, 2017 -#+SINCE: v2.0 -#+STARTUP: inlineimages +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor file-templates][Issues]] ↖ [[doom-module-source:editor/file-templates][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor file-templates +#+SUBTITLE: Fill the void in your empty files +#+CREATED: February 11, 2017 +#+SINCE: 2.0.0 -* Table of Contents :TOC_2:noexport: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] -- [[#prerequisites][Prerequisites]] -- [[#usage][Usage]] - - [[#inserting-oss-licenses][Inserting OSS licenses]] -- [[#configuration][Configuration]] - - [[#registering-a-new-file-template][Registering a new file template]] - - [[#changing-existing-file-templates][Changing existing file templates]] - - [[#adding-new-oss-licenses][Adding new OSS licenses]] -- [[#troubleshooting][Troubleshooting]] -- [[#appendix][Appendix]] - - [[#api][API]] - - [[#commands][Commands]] - - [[#variables][Variables]] +* Description :unfold: +This module adds file templates for blank files, powered by [[doom-package:][yasnippet]]. -* Description -This module adds file templates for blank files, powered by yasnippet. +** Maintainers +- [[doom-user:][@hlissner]] -** Module Flags -This module provides no flags. +[[doom-contrib-maintainer:][Become a maintainer?]] -** Plugins -This module installs no plugins. +** Module flags +/This module has no flags./ -* Prerequisites -This module has no prerequisites. +** Packages +/This module doesn't install any packages./ -* Usage -File templates are automatically expanded when opening empty files. +** Hacks +- [[doom-package:][yasnippet]] -They are also regular yasnippet snippets, which can be expanded by typing their -trigger and pressing =TAB=. By convention, the triggers for file templates are -prefixed with two underscores ~__~. +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +File templates are automatically expanded when opening empty files who match one +of the rules in the ~+file-templates-alist~ variable. + +These templates are simply yasnippet snippets, which can also be expanded by +typing their trigger and pressing [[kbd:][TAB]]. By convention, the triggers for file +templates are prefixed with two underscores ~__~ (the trigger for the default +file template of a major mode is almost always ~__~). ** Inserting OSS licenses A special command is available for inserting software licenses: ~M-x +file-templates/insert-license~. #+begin_quote -Licenses with a ~-bp~ suffix are boilerplate templates; shorter versions meant -for comment headers in code. + 📌 Licenses with a ~-bp~ suffix are boilerplate templates; i.e. shorter + versions intended for comment headers in code files. #+end_quote -* Configuration -** Registering a new file template -Look into the documentation of ~set-file-template!~ and ~set-file-templates!~. -** Changing existing file templates -Simply register a new template (using ~set-file-template!~) that matches the same -file. The new template would be pushed to the top of ~+file-template-alist~ and -thus would take priority while searching for a template to insert. -** Adding new OSS licenses -The ~+file-templates/insert-license~ command searches for snippets under -~text-mode~ that are named ~__license-ABC~, where ABC is the short name of the -license. e.g. ~__license-mit~. +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote -So long as these files exist, ~+file-templates/insert-license~ will recognize -them. +** Adding new or changing existing file templates +New file templates can be added to +=$DOOMDIR/snippets/{major-mode}/{snippet-name}=. The yasnippet documentation +covers [[https://joaotavora.github.io/yasnippet/snippet-development.html][how to write a snippet]]. You can map a snippet to a file path, major mode, +or another arbitrary predicate using [[fn:][set-file-template!]]. + +Look into its documentation with [[kbd:][ f set-file-template\!]]. + +** Adding new OSS licenses +Add snippet files to =$DOOMDIR/snippets/text-mode/= with the =__licenses-= +prefix and [[fn:][+file-templates/insert-license]] will recognize them. E.g. +=$DOOMDIR/snippets/text-mode/__license-mit=. * Troubleshooting -If a file template isn't expanding where you expect it to, run ~M-x -+file-templates/debug~. This will report to you what file template rule would -apply for the correct file. +- If a file template isn't expanding where you expect it to, run ~M-x + +file-templates/debug~. This will report to you what file template rule would + apply for the correct file. + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 /This module's appendix is incomplete./ [[doom-contrib-module:][Write more?]] +#+end_quote -* Appendix ** API -+ ~set-file-template! PRED &rest PLIST~ -+ ~set-file-templates! &rest TEMPLATES~ +- ~set-file-template! PRED &rest PLIST~ +- ~set-file-templates! &rest TEMPLATES~ ** Commands -+ ~+file-templates/insert-license~ -+ ~+file-templates/debug~ +- ~+file-templates/insert-license~ +- ~+file-templates/debug~ ** Variables -+ ~+file-templates-dir~ -+ ~+file-templates-default-trigger~ -+ ~+file-templates-alist~ +- ~+file-templates-dir~ +- ~+file-templates-default-trigger~ +- ~+file-templates-alist~ diff --git a/modules/editor/fold/README.org b/modules/editor/fold/README.org index 5064eb72a..01eca2f9a 100644 --- a/modules/editor/fold/README.org +++ b/modules/editor/fold/README.org @@ -1,44 +1,69 @@ -#+TITLE: editor/fold -#+DATE: February 17, 2019 -#+SINCE: v2.1 -#+STARTUP: inlineimages +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor fold][Issues]] ↖ [[doom-module-source:editor/fold][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor fold +#+SUBTITLE: What you can't see won't hurt you +#+CREATED: May 15, 2019 +#+SINCE: 2.1 -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] -- [[#prerequisites][Prerequisites]] -- [[#features][Features]] -- [[#configuration][Configuration]] -- [[#troubleshooting][Troubleshooting]] - -* Description -This module marries hideshow, vimish-fold and outline-minor-mode to bring you +* Description :unfold: +This module marries [[doom-package:][hideshow]], [[doom-package:][vimish-fold]], and ~outline-minor-mode~ to bring you marker, indent and syntax-based code folding for as many languages as possible. -** Module Flags -This module provides no flags. +** Maintainers +- [[doom-user:][@hlissner]] -** Plugins -+ [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]] -+ [[https://github.com/matsievskiysv/vimish-fold][vimish-fold]] +[[doom-contrib-maintainer:][Become a maintainer?]] -* Prerequisites -This module has no prerequisites. +** Module flags +/This module has no flags./ -* Features +** Packages +- [[doom-package:][evil-vimish-fold]] +- [[doom-package:][vimish-fold]] -Emacs keybinds when evil +everywhere is disabled. -| Keybind | Description | -|------------------------+---------------------------| -| =C-c C-f C-f= | Fold region | -| =C-c C-f C-u= or =C `= | Unfold region | -| =C-c C-f C-d= | Delete folded region | -| =C-c C-f C-a C-f= | Fold all regions | -| =C-c C-f C-a C-u= | Unfold all regions | -| =C-c C-a C-d= | Delete all folded regions | +** TODO Hacks +#+begin_quote + 🔨 This module's hacks haven't been documented yet. [[doom-contrib-module:][Document them?]] +#+end_quote + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +Emacs keybinds when [[doom-module:][:editor evil +everywhere]] is disabled: +| Keybind | Description | +|--------------------+---------------------------| +| [[kbd:][C-c C-f C-f]] | Fold region | +| [[kbd:][C-c C-f C-u]] or [[kbd:][C `]] | Unfold region | +| [[kbd:][C-c C-f C-d]] | Delete folded region | +| [[kbd:][C-c C-f C-a C-f]] | Fold all regions | +| [[kbd:][C-c C-f C-a C-u]] | Unfold all regions | +| [[kbd:][C-c C-a C-d]] | Delete all folded regions | * TODO Configuration +#+begin_quote + 🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote * Troubleshooting -Sometimes an unfolded region does not fold back with =C-c C-f C-f=. To bypass this bug you must delete the folded region (=C-c C-f C-d=) and then fold it(=C-c C-f C-f=) again. +- Sometimes, an unfolded region won't fold back with [[kbd:][C-c C-f C-f]]. To bypass this + bug you must delete the folded region ([[kbd:][C-c C-f C-d]]) and then fold it ([[kbd:][C-c C-f + C-f]]) again. + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/format/README.org b/modules/editor/format/README.org index 95569c4a9..0e11eb7c7 100644 --- a/modules/editor/format/README.org +++ b/modules/editor/format/README.org @@ -1,30 +1,17 @@ -#+TITLE: editor/format -#+DATE: July 25, 2020 -#+SINCE: v3.0.0 -#+STARTUP: inlineimages nofold +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor format][Issues]] ↖ [[doom-module-source:editor/format][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor format +#+SUBTITLE: Standardize your ugly code +#+CREATED: July 26, 2020 +#+SINCE: 21.12.0 #+begin_quote -This module has been scheduled for a rewrite. Its documentation will remain -incomplete and edge cases left unpatched in the meantime. A preview of this -rewrite can be found [[https://github.com/hlissner/doom-emacs-private/tree/master/modules/editor/format][in my private config]]. + 🔨 This module has been scheduled for a rewrite. Its documentation will remain + incomplete and edge cases left unpatched in the meantime. A preview of this + rewrite can be found [[https://github.com/hlissner/doom-emacs-private/tree/master/modules/editor/format][in my private config]]. #+end_quote -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#maintainers][Maintainers]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] - - [[#hacks][Hacks]] -- [[#prerequisites][Prerequisites]] -- [[#features][Features]] -- [[#configuration][Configuration]] - - [[#automatic-reformatting-when-saving-buffers][Automatic reformatting when saving buffers]] - - [[#disabling-the-lsp-formatter][Disabling the LSP formatter]] - - [[#defining-your-own-formatters][Defining your own formatters]] - - [[#selecting-a-specific-formatter-for-a-particular-buffer][Selecting a specific formatter for a particular buffer]] -- [[#troubleshooting][Troubleshooting]] - -* Description +* Description :unfold: This module integrates code formatters into Emacs. Here are some of the formatters that it currently supports: @@ -37,88 +24,102 @@ rustfmt, scalafmt, script shfmt, snakefmt, sqlformat, styler, swiftformat, tidy #+end_quote ** Maintainers -This module has no dedicated maintainers. +/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]] -** Module Flags -+ =+onsave= Preform buffer-wide reformatting of a buffer when you save it. See - ~+format-on-save-enabled-modes~ to control what major modes to (or not to) +** Module flags +- +onsave :: + Enable reformatting of a buffer when it is saved. See + [[var:][+format-on-save-enabled-modes]] to control what major modes to (or not to) format on save. -** Plugins -+ [[https://github.com/lassik/emacs-format-all-the-code][format-all]] +** Packages +- [[doom-package:][format-all]] ** Hacks -+ format-all has been heavily modified to suit Doom's goals for this module: - + Reformatted text is applied to the buffer by RCS patch, as to reduce its +- format-all has been heavily modified to suit Doom's goals for this module: + - Reformatted text is applied to the buffer by RCS patch, as to reduce its affect on cursor position. - + Adds partial formatting, i.e. you can now reformat a subset of the buffer. - + Adds the ability to use any arbitrary formatter on the current buffer if you - pass the universal argument to ~+format/buffer~ or ~+format/region~ (i.e. + - Adds partial formatting, i.e. you can now reformat a subset of the buffer. + - Adds the ability to use any arbitrary formatter on the current buffer if you + pass the universal argument to [[fn:][+format/buffer]] or [[fn:][+format/region]] (i.e. removes the major-mode lock on formatters). -* Prerequisites -This module depends on external programs to perform the actual formatting. These -will need to be installed for them to work. In their absence, =format-all= will -fail silently. +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ -+ Angular/Vue (prettier) -+ Assembly (asmfmt) -+ Bazel Starlark (buildifier) -+ BibTeX (emacs) -+ C/C++/Objective-C (clang-format) -+ Cabal (cabal-fmt) -+ Clojure/ClojureScript (node-cljfmt) -+ CMake (cmake-format) -+ Crystal (crystal tool format) -+ CSS/Less/SCSS (prettier) -+ D (dfmt) -+ Dart (dartfmt) -+ Dhall (dhall format) -+ Dockerfile (dockfmt) -+ Elixir (mix format) -+ Elm (elm-format) -+ Emacs Lisp (emacs) -+ Fish Shell (fish_indent) -+ Fortran 90 (fprettify) -+ Gleam (gleam format) -+ Go (gofmt) -+ GraphQL (prettier) -+ Haskell (brittany) -+ HTML/XHTML/XML (tidy) -+ Java (clang-format) -+ JavaScript/JSON/JSX (prettier) -+ Jsonnet (jsonnetfmt) -+ Kotlin (ktlint) -+ LaTeX (latexindent) -+ Ledger (ledger-mode) -+ Lua (lua-fmt) -+ Markdown (prettier) -+ Nix (nixfmt) -+ OCaml (ocp-indent) -+ Perl (perltidy) -+ PHP (prettier plugin-php) -+ Protocol Buffers (clang-format) -+ PureScript (purty) -+ Python (black) -+ R (styler) -+ Ruby (rufo) -+ Rust (rustfmt) -+ Scala (scalafmt) -+ Shell script (shfmt) -+ Snakemake (snakefmt) -+ Solidity (prettier-plugin-solidity) -+ SQL (sqlformat) -+ Swift (swiftformat) -+ Terraform (terraform fmt) -+ TOML (prettier-plugin-toml) -+ TypeScript/TSX (prettier) -+ Verilog (iStyle) -+ YAML (prettier) +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] -* TODO Features -# An in-depth list of features, how to use them, and their dependencies. +This module has no direct requirements, but each language will need one of their +supported formatter programs in order for this to work. In their absence, +[[doom-package:][format-all]] will fail silently. + +Supported formatters: +- Angular/Vue (prettier) +- Assembly (asmfmt) +- Bazel Starlark (buildifier) +- BibTeX (emacs) +- C/C++/Objective-C (clang-format) +- Cabal (cabal-fmt) +- Clojure/ClojureScript (node-cljfmt) +- CMake (cmake-format) +- Crystal (crystal tool format) +- CSS/Less/SCSS (prettier) +- D (dfmt) +- Dart (dartfmt) +- Dhall (dhall format) +- Dockerfile (dockfmt) +- Elixir (mix format) +- Elm (elm-format) +- Emacs Lisp (emacs) +- Fish Shell (fish_indent) +- Fortran 90 (fprettify) +- Gleam (gleam format) +- Go (gofmt) +- GraphQL (prettier) +- Haskell (brittany) +- HTML/XHTML/XML (tidy) +- Java (clang-format) +- JavaScript/JSON/JSX (prettier) +- Jsonnet (jsonnetfmt) +- Kotlin (ktlint) +- LaTeX (latexindent) +- Ledger (ledger-mode) +- Lua (lua-fmt) +- Markdown (prettier) +- Nix (nixfmt) +- OCaml (ocp-indent) +- Perl (perltidy) +- PHP (prettier plugin-php) +- Protocol Buffers (clang-format) +- PureScript (purty) +- Python (black) +- R (styler) +- Ruby (rufo) +- Rust (rustfmt) +- Scala (scalafmt) +- Shell script (shfmt) +- Snakemake (snakefmt) +- Solidity (prettier-plugin-solidity) +- SQL (sqlformat) +- Swift (swiftformat) +- Terraform (terraform fmt) +- TOML (prettier-plugin-toml) +- TypeScript/TSX (prettier) +- Verilog (iStyle) +- YAML (prettier) + +* TODO Usage +#+begin_quote + 🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote -* Configuration ** Automatic reformatting when saving buffers There are two ways to achieve this. Either through the =+onsave= flag, or by adding ~format-all-mode~ to the hook of each major mode you want this behavior @@ -128,29 +129,29 @@ If you choose the former, what modes it applies to can be changed by modifying ~+format-on-save-enabled-modes~, which contains a list of major modes. If the first item in the list is the symbol ~not~, the list is negated. This is its default value: -#+BEGIN_SRC elisp +#+begin_src emacs-lisp (setq +format-on-save-enabled-modes '(not emacs-lisp-mode ; elisp's mechanisms are good enough sql-mode ; sqlformat is currently broken tex-mode ; latexindent is broken latex-mode)) -#+END_SRC +#+end_src If you want to format code when you save a buffer, but want more granular control over which major modes this behavior is enabled in, there is an -alternative. Make sure =+onsave= is disabled before you try this: - -#+BEGIN_SRC elisp +alternative. Make sure [[doom-module:][+onsave]] is disabled before you try this: +#+begin_src emacs-lisp (add-hook 'python-mode-hook #'format-all-mode) (add-hook 'js2-mode-hook #'format-all-mode) -#+END_SRC +#+end_src ** Disabling the LSP formatter If you are in a buffer with ~lsp-mode~ enabled and a server that supports -=textDocument/formatting=, it will be used instead of =format-all='s formatter. +=textDocument/formatting=, it will be used instead of [[doom-package:][format-all]]'s formatter. + To disable this behavior universally use: ~(setq +format-with-lsp nil)~ -+ To disable this behavior in one mode: ~(setq-hook! 'python-mode-hook +format-with-lsp nil)~ ++ To disable this behavior in one mode: ~(setq-hook! 'python-mode-hook + +format-with-lsp nil)~ ** TODO Defining your own formatters See the ~set-formatter!~ function. @@ -158,17 +159,24 @@ See the ~set-formatter!~ function. ** TODO Selecting a specific formatter for a particular buffer Set the buffer-local variable ~+format-with~ to the name of the formatter to use. e.g. - -#+BEGIN_SRC elisp +#+begin_src emacs-lisp (setq-hook! 'python-mode-hook +format-with 'html-tidy) ;; Or set it to `:none' to disable formatting (setq-hook! 'python-mode-hook +format-with :none) -#+END_SRC +#+end_src Formatters are referred to by the name they were defined with. They can be looked up in the ~format-all-mode-table~ hash table or in format-all's [[https://github.com/lassik/emacs-format-all-the-code/blob/master/format-all.el#L512][source code]]. * Troubleshooting -# Common issues and their solution, or places to look for help. +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/god/README.org b/modules/editor/god/README.org new file mode 100644 index 000000000..5d858c618 --- /dev/null +++ b/modules/editor/god/README.org @@ -0,0 +1,57 @@ +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor god][Issues]] ↖ [[doom-module-source:editor/god][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor god +#+SUBTITLE: IDDQD +#+CREATED: October 13, 2021 +#+SINCE: 21.12.0 + +#+begin_quote + 🚧 *This module is deprecated.* ~god-mode~ is EOL and no longer maintained. +#+end_quote + +* Description :unfold: +Adds [[doom-package:][god-mode]] support to Doom Emacs, allowing for entering commands without +modifier keys, similar to Vim's modality, separating command mode and insert +mode. + +** Maintainers +*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +/This module has no flags./ + +** Packages +- [[doom-package:][god-mode]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* Usage +#+begin_quote +🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* Configuration +#+begin_quote +🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* Troubleshooting +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* Appendix +#+begin_quote +🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/lispy/README.org b/modules/editor/lispy/README.org index 7deebcd1d..81d1ef1fd 100644 --- a/modules/editor/lispy/README.org +++ b/modules/editor/lispy/README.org @@ -1,18 +1,14 @@ -#+TITLE: editor/lispy -#+DATE: October 27, 2018 -#+SINCE: v2.0 -#+STARTUP: inlineimages +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor lispy][Issues]] ↖ [[doom-module-source:editor/lispy][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor lispy +#+SUBTITLE: Vim for lisp, for people who don't like vim +#+CREATED: October 27, 2018 +#+SINCE: 2.0.0 -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] -- [[#prerequisites][Prerequisites]] -- [[#troubleshooting][Troubleshooting]] - - [[#mouse-wheel-and-wrapadditional-wrap-key-themes-in-tty-emacs-2573][Mouse wheel and =wrap=/=additional-wrap= key themes in TTY Emacs (#2573)]] - -* Description -This module adds [[https://github.com/noctuid/lispyville][lispy]] key functionality in Lisp languages. - -This includes: +* Description :unfold: +This module adds a keybind scheme for navigating and editing S-expressions in +Lisps; including S-exp awareness for Evil users. This affects the following +languages: - Common Lisp - Emacs Lisp @@ -23,12 +19,43 @@ This includes: - Clojure - [[https://fennel-lang.org][Fennel]] -If evil is enabled, lispyville would also be activated for every mode where -lispy is active +** Maintainers +*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +/This module has no flags./ + +** Packages +- [[doom-package:][lispy]] +- [[doom-package:][lispyville]] if [[doom-module:][:editor evil +everywhere]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +If [[doom-module:][:editor evil]] is enabled, [[doom-package:][lispyville]] would also be activated for every mode +where [[doom-package:][lispy]] is active. + +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote The default key themes that are set are as follows: - -#+BEGIN_SRC emacs-lisp +#+begin_src emacs-lisp '((operators normal) c-w (prettify insert) @@ -36,18 +63,25 @@ The default key themes that are set are as follows: slurp/barf-lispy additional additional-insert) -#+END_SRC +#+end_src To change the key themes set ~lispyville-key-theme~. Think of ~lispyville-key-theme~ as the equivalent of ~parinfer-extensions~. See lispyville's [[https://github.com/noctuid/lispyville/blob/master/README.org][README]] for more info on the specific keybindings of each key theme (starting [[https://github.com/noctuid/lispyville#operators-key-theme][here]]). -* Prerequisites -This module has no prerequisites. - * Troubleshooting +[[doom-report:][Report an issue?]] + ** Mouse wheel and =wrap=/=additional-wrap= key themes in TTY Emacs ([[https://github.com/hlissner/doom-emacs/issues/2573][#2573]]) -lispyville binds =M-[= to ~lispyville-wrap-brackets~ when the =wrap= or -=additional-wrap= key theme are enabled. In terminal Emacs, this is the key +lispyville binds [[kbd:][M-[]] to ~lispyville-wrap-brackets~ when the =wrap= or +=additional-wrap= key themes are enabled. In terminal Emacs, this is the key Emacs receives when you scroll with your mouse wheel. + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/multiple-cursors/README.org b/modules/editor/multiple-cursors/README.org new file mode 100644 index 000000000..fa92d3091 --- /dev/null +++ b/modules/editor/multiple-cursors/README.org @@ -0,0 +1,80 @@ +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor multiple-cursors][Issues]] ↖ [[doom-module-source:editor/multiple-cursors][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor multiple-cursors +#+SUBTITLE: Make all your mistakes at once +#+CREATED: October 13, 2021 +#+SINCE: 21.12.0 + +* Description :unfold: +This module adds a multiple cursors implementation to Emacs (two, if you use +evil) that loosely take after multi-cursors in Atom or Sublime Text. + +** Maintainers +- [[doom-user:][@hlissner]] + +[[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +/This module has no flags./ + +** Packages +- if [[doom-module:][:editor evil]] + - [[doom-package:][evil-multiedit]] + - [[doom-package:][evil-mc]] +- else + - [[doom-package:][multiple-cursors]] + +** Hacks +- Attempts to smooth over [[doom-package:][multiple-cursors]]' incompatibilities with [[doom-package:][evil]], which + is used internally in some third party plugins. +- Attempts to smooth over [[doom-package:][evil-mc]]'s incompatibilities with other packages, like + [[doom-package:][lispy]]. + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +** evil-mc +- The [[doom-package:][evil-mc]] keys are under the [[kbd:][gz]] prefix, e.g. + - [[kbd:][gzz]] to toggle new (frozen) cursors at point. + - [[kbd:][gzt]] to toggle mirroring on and off (or switch to insert mode to activate + them). + - [[kbd:][gzA]] to place cursors at the end of each selected line. + - [[kbd:][gzI]] will place them at the beginning. +- There's also the ex command ~:mc/REGEXP/FLAGS~, for laying down cursors by + regex. + +** evil-multiedit +Designates "interactive edit" regions. Only the textual changes to them are mirrored. + +- [[kbd:][M-d]] to iedit the symbol at point. Again to iedit its next match. +- [[kbd:][M-S-d]] to do it backwards. +- [[kbd:][R]] (in visual mode) to iedit all matches of the selection at point in the + buffer. +- Or ~:iedit/REGEX~ to iedit all matches of REGEX. + +* TODO Configuration +#+begin_quote +🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* Troubleshooting +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* Appendix +#+begin_quote +🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/objed/README.org b/modules/editor/objed/README.org index 3b7af3de9..bcddf20f9 100644 --- a/modules/editor/objed/README.org +++ b/modules/editor/objed/README.org @@ -1,23 +1,62 @@ -#+TITLE: editor/objed -#+DATE: May 30, 2019 -#+SINCE: v2.1 +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor objed][Issues]] ↖ [[doom-module-source:editor/objed][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor objed +#+SUBTITLE: Text object editing for the innocent +#+CREATED: May 30, 2019 +#+SINCE: 2.1 -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - -* Description -This modules adds [[https://github.com/clemera/objed][objed]], a global minor-mode for navigating and manipulating -text objects. It combines the ideas of versor-mode and other editors like Vim or -Kakoune and tries to align them with regular Emacs conventions. - -#+begin_quote -This module is incompatible with the =:editor evil=. Enabling them both will -cause errors. -#+end_quote +* Description :unfold: +This modules adds [[doom-package:][objed]], a global minor-mode for navigating and manipulating +text objects. It combines the ideas of ~versor-mode~ and other editors like Vim +or Kakoune and tries to align them with regular Emacs conventions. [[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage. -** Module Flags -+ ~+manual~ Do not turn =objed= automatically. The user is responsible for calling - `objed-activate` (bound to `M-SPC` if using the default Emacs bindings.) +** Maintainers +*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +- +manual :: + Don't activate [[doom-package:][objed]] at startup, automatically, leaving it to the user to call + [[fn:][objed-activate]] (bound to [[kbd:][M-SPC]] if using [[doom-module:][:config default +bindings]]). + +** Packages +- [[doom-package:][objed]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +#+begin_quote + 🚧 This module is incompatible with [[doom-module:][:editor evil]]. Do not enable them both at + the same time or you will get errors. +#+end_quote + +* TODO Usage +#+begin_quote + 🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* TODO Configuration +#+begin_quote + 🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* Troubleshooting +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/parinfer/README.org b/modules/editor/parinfer/README.org index 210c8707b..cd3ddc796 100644 --- a/modules/editor/parinfer/README.org +++ b/modules/editor/parinfer/README.org @@ -1,55 +1,59 @@ -#+TITLE: editor/parinfer -#+DATE: June 9, 2018 -#+SINCE: v2.1 -#+STARTUP: inlineimages nofold - -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#maintainers][Maintainers]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] -- [[#prerequisites][Prerequisites]] -- [[#features][Features]] - - [[#keybindings][Keybindings]] -- [[#configuration][Configuration]] -- [[#troubleshooting][Troubleshooting]] - -* Description +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor parinfer][Issues]] ↖ [[doom-module-source:editor/parinfer][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor parinfer +#+SUBTITLE: For lispers that like Python more (i.e. nobody) +#+CREATED: February 27, 2021 +#+SINCE: 2.1 +* Description :unfold: Parinfer is a minor mode that aids the writing of Lisp code. It automatically infers parenthesis matching and indentation alignment, keeping your code balanced and beautiful. -Note that the original =parinfer-mode= has been deprecated and superceded by -=parinfer-rust-mode=, which has much better performance. - ** Maintainers +*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]] -This module has no dedicated maintainers. +** Module flags +/This module has no flags./ -** Module Flags +** Packages +- [[doom-package:][parinfer-rust-mode]] -This module provides no flags. +** Hacks +/No hacks documented for this module./ -** Plugins +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ -+ [[https://github.com/justinbarclay/parinfer-rust-mode][parinfer-rust-mode]] +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] -* Prerequisites +This module requires [[https://github.com/justinbarclay/parinfer-rust-mode#parinfer-rust-library][parinfer-rust]]. -This module has no prerequisites. - -* Features +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote ** Keybindings +| Binding | Description | +|-----------------+-------------------------------------------| +| [[kbd:][ p]] | Toggle between different inference modes. | +| [[kbd:][ P]] | Temporarily disable parinfer. | -| Binding | Description | -|-------------------+-------------------------------------------| -| ~ m p~ | Toggle between different inference modes. | -| ~ m P~ | Temporarily disable parinfer. | - -* Configuration -# How to configure this module, including common problems and how to address them. +* TODO Configuration +#+begin_quote + 🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote * Troubleshooting -# Common issues and their solution, or places to look for help. +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/rotate-text/README.org b/modules/editor/rotate-text/README.org index 390ee6e97..0216aebe6 100644 --- a/modules/editor/rotate-text/README.org +++ b/modules/editor/rotate-text/README.org @@ -1,52 +1,79 @@ -#+TITLE: editor/rotate-text -#+DATE: October 14, 2021 -#+SINCE: v2.0.4 -#+STARTUP: inlineimages nofold +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor rotate-text][Issues]] ↖ [[doom-module-source:editor/rotate-text][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor rotate-text +#+SUBTITLE: The only back'n'forth nerds will ever know +#+CREATED: June 22, 2018 +#+SINCE: 2.0.4 -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#maintainers][Maintainers]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] -- [[#prerequisites][Prerequisites]] -- [[#features][Features]] -- [[#configuration][Configuration]] - -* Description -# A summary of what this module does. -Provides a convenient way to rotate trough a set of related entities using a single key binding. There are both globally available sets as well as mode local once. For example the sequence ~enable~ and ~disable~ is globally available whereas the sequence ~public~, ~protected~ and ~private~ is only available in ~c++~ mode. +* Description :unfold: +This module adds text rotation to Doom Emacs. I.e. The ability to cycle through +keywords or text patterns at point, like ~true~ and ~false~, or ~public~, +~protected~, and ~private~ (in ~c++-mode~). ** Maintainers -# If this module has no maintainers, then... -This module has no dedicated maintainers. +- [[doom-user:][@hlissner]] -** Module Flags -# If this module has no flags, then... -This module provides no flags. +[[doom-contrib-maintainer:][Become a maintainer?]] -** Plugins -+ [[https://github.com/debug-ito/rotate-text.el][rotate-text.el]] +** Module flags +/This module has no flags./ -* Prerequisites -This module has no prerequisites. +** Packages +- [[doom-package:][rotate-text]] -* Features -# An in-depth list of features, how to use them, and their dependencies. -With point on a word or symbol that is part of a sequence you can call ~rotate-text~ or ~rotate-text-backward~ to rotate to the next or previous item in the sequence. The list of items will wrap around as you cycle through them. +** Hacks +/No hacks documented for this module./ -* Configuration -To enable a set of items to cycle through globally, add the following to your configuration +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote +🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +For evil users: [[kbd:][[r]] and [[kbd:][]r]] will cycle back and forward (respectively) through +specified patterns for the text at point. Patterns will wrap around as you cycle +through them. + +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +To enable a set of items to cycle through globally: #+begin_src emacs-lisp -;; in ~/.doom.d/config.el +;; in $DOOMDIR/config.el (after! rotate-text - (pushnew! rotate-text-words '("small" "medium" "large"))) + (add-to-list 'rotate-text-words '("small" "medium" "large"))) #+end_src -To add a sequence to a specific mode, you can add something like the following to your configuration +To add a sequence to a specific mode: #+begin_src emacs-lisp -;; in ~/.doom.d/config.el +;; in $DOOMDIR/config.el (set-rotate-patterns! 'c++-mode :words '(("float" "double"))) -#+end_src +#+end_src -When configuring a sequence of words or symbols that should be rotated through, it is important that all items are all lower case. The casing will be determined by the item that initiated the rotation. For example, ~Small~ will be replaced with ~Medium~ and ~SMALL~ will be replaced with ~MEDIUM~ using the example described above. +When configuring a sequence of words or symbols that should be rotated through, +it is important that all items are all lower case. The casing will be determined +by the item that initiated the rotation. For example, ~Small~ will be replaced +with ~Medium~ and ~SMALL~ will be replaced with ~MEDIUM~ using the example +described above. + +* Troubleshooting +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* Appendix +#+begin_quote +🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/snippets/README.org b/modules/editor/snippets/README.org index a5b3b955e..5a288bd6c 100644 --- a/modules/editor/snippets/README.org +++ b/modules/editor/snippets/README.org @@ -1,46 +1,65 @@ -#+TITLE: editor/snippets -#+DATE: February 11, 2017 -#+SINCE: v2.0 -#+STARTUP: inlineimages +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor snippets][Issues]] ↖ [[doom-module-source:editor/snippets][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor snippets +#+SUBTITLE: My elves type so I don't have to +#+CREATED: February 11, 2017 +#+SINCE: 2.0.0 -* Table of Contents :TOC: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] - - [[#hacks][Hacks]] -- [[#prerequisites][Prerequisites]] -- [[#features][Features]] -- [[#configuration][Configuration]] - - [[#disabling-the-built-in-snippets][Disabling the built-in snippets]] -- [[#troubleshooting][Troubleshooting]] +* Description :unfold: +This module adds snippet expansions to Emacs, powered by [[doom-package:][yasnippet]]. -* Description -This module adds snippets to Emacs, powered by yasnippet. +** Maintainers +- [[doom-user:][@hlissner]] + +[[doom-contrib-maintainer:][Become a maintainer?]] -** Module Flags -This module exposes no flags. +** Module flags +/This module exposes no flags./ -** Plugins -+ [[https://github.com/joaotavora/yasnippet][yasnippet]] -+ [[https://github.com/abo-abo/auto-yasnippet][auto-yasnippet]] -+ [[https://github.com/hlissner/doom-snippets][doom-snippets]] +** Packages +- [[doom-package:][yasnippet]] +- [[doom-package:][auto-yasnippet]] +- [[doom-package:][doom-snippets]] ** TODO Hacks +#+begin_quote + 🔨 This module's hacks haven't been documented yet. [[doom-contrib-module:][Document them?]] +#+end_quote -* Prerequisites -This module has no external dependencies. +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ -* TODO Features +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote -* Configuration ** Disabling the built-in snippets -Don't want to use provided one? Then add this to your private module, - -#+BEGIN_SRC emacs-lisp -;; in ~/.doom.d/packages.el +#+begin_src emacs-lisp +;; in $DOOMDIR/packages.el (package! doom-snippets :ignore t) ;; If you want to replace it with yasnippet's default snippets (package! yasnippet-snippets) -#+END_SRC +#+end_src -* TODO Troubleshooting +* Troubleshooting +/There are no known problems with this module./ [[doom-report:][Report one?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/editor/word-wrap/README.org b/modules/editor/word-wrap/README.org index 1f21da495..a0ce24169 100644 --- a/modules/editor/word-wrap/README.org +++ b/modules/editor/word-wrap/README.org @@ -1,17 +1,81 @@ -#+TITLE: editor/word-wrap -#+DATE: August 26, 2019 -#+SINCE: v2.1 +← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::editor word-wrap][Issues]] ↖ [[doom-module-source:editor/word-wrap][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]] +-------------------------------------------------------------------------------- +#+TITLE: :editor word-wrap +#+SUBTITLE: Soft-wrapping with language-aware indent +#+CREATED: August 25, 2019 +#+SINCE: 2.1 -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] -- [[#configuration][Configuration]] - -* Description -This module adds a minor-mode ~+word-wrap-mode~, which intelligently wraps long +* Description :unfold: +This module adds a minor-mode [[fn:][+word-wrap-mode]], which intelligently wraps long lines in the buffer without modifying the buffer content. +** Maintainers +- [[doom-user:][@flatwhatson]] + +[[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +/This module has no flags./ + +** Packages +- [[doom-package:][adaptive-wrap]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* TODO Usage +#+begin_quote + 🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +** Activation +Word wrapping is not enabled by default. + +Wrapping can be toggled in the current buffer with ~M-x +word-wrap-mode~. The +default doom bindings bind this to [[kbd:][SPC t w]] for ~evil~ users. + +To enable wrapping in a specific mode, add it to the appropriate hook in your +~config.el~: +#+begin_src emacs-lisp +;; enable word-wrap in C/C++/ObjC/Java +(add-hook 'c-mode-common-hook #'+word-wrap-mode) +#+end_src + +To customize the behaviour in a specific mode: +#+begin_src emacs-lisp +;; use a single indent in json-mode +(add-hook! 'json-mode-hook + (setq-local +word-wrap-extra-indent 'single) + (+word-wrap-mode +1)) +#+end_src + +To turn on word wrapping (almost) everywhere: +#+begin_src emacs-lisp +;; enable word-wrap (almost) everywhere +(+global-word-wrap-mode +1) +#+end_src + +To disable global word-wrapping in a specific mode: +#+begin_src emacs-lisp +;; disable global word-wrap in emacs-lisp-mode +(add-to-list '+word-wrap-disabled-modes 'emacs-lisp-mode) +#+end_src + +** Settings Wrapped lines will be indented to match the preceding line. In code buffers, lines which are not inside a string or comment will have extra indentation as determined by ~+word-wrap-extra-indent~. The default is to increase the indent @@ -37,45 +101,13 @@ The ~+word-wrap-visual-modes~ variable lists modes which should only enable ~visual-line-mode~ and not provide any prefix indentation. This is useful for modes like ~org-mode~ which handle prefix indentation themselves. -** Module Flags -This module provides no flags. +* Troubleshooting +/There are no known problems with this module./ [[doom-report:][Report one?]] -** Plugins -+ [[https://elpa.gnu.org/packages/adaptive-wrap.html][adaptive-wrap]] +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] -* Configuration -Word wrapping is not enabled by default. - -Wrapping can be toggled in the current buffer with ~M-x +word-wrap-mode~. The -default doom bindings bind this to ~SPC t w~ for ~evil~ users. - -To enable wrapping in a specific mode, add it to the appropriate hook in your -~config.el~: - -#+BEGIN_SRC emacs-lisp -;; enable word-wrap in C/C++/ObjC/Java -(add-hook 'c-mode-common-hook #'+word-wrap-mode) -#+END_SRC - -To customize the behaviour in a specific mode: - -#+BEGIN_SRC emacs-lisp -;; use a single indent in json-mode -(add-hook! 'json-mode-hook - (setq-local +word-wrap-extra-indent 'single) - (+word-wrap-mode +1)) -#+END_SRC - -To turn on word wrapping (almost) everywhere: - -#+BEGIN_SRC emacs-lisp -;; enable word-wrap (almost) everywhere -(+global-word-wrap-mode +1) -#+END_SRC - -To disable global word-wrapping in a specific mode: - -#+BEGIN_SRC emacs-lisp -;; disable global word-wrap in emacs-lisp-mode -(add-to-list '+word-wrap-disabled-modes 'emacs-lisp-mode) -#+END_SRC +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote