docs(:editor): update READMEs to new format
This commit is contained in:
parent
c27f005011
commit
9ada400805
13 changed files with 877 additions and 531 deletions
|
@ -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
|
#+TITLE: :editor
|
||||||
#+CREATED: July 30, 2021
|
#+CREATED: July 30, 2021
|
||||||
#+SINCE: v21.12.0
|
#+SINCE: 21.12.0
|
||||||
#+SETUPFILE: ../../docs/.setupfile.org
|
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
For modules concerned with the insertion, manipulation, and general editing of
|
For modules concerned with the insertion and editing of text. Amen.
|
||||||
text. Amen.
|
|
||||||
|
|
|
@ -1,114 +1,115 @@
|
||||||
#+TITLE: editor/evil
|
← [[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]]
|
||||||
#+DATE: February 2, 2017
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.0
|
#+TITLE: :editor evil
|
||||||
#+STARTUP: inlineimages nofold
|
#+SUBTITLE: The text editor Emacs was missing
|
||||||
|
#+CREATED: April 08, 2020
|
||||||
|
#+SINCE: 2.0.0
|
||||||
|
|
||||||
* Table of Contents :TOC_3:noexport:
|
* Description :unfold:
|
||||||
- [[#description][Description]]
|
This holy module brings the Vim editing model to Emacs.
|
||||||
- [[#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
|
** Maintainers
|
||||||
This holy module brings the vim experience to Emacs.
|
- [[doom-user:][@hlissner]]
|
||||||
|
|
||||||
** Module Flags
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
+ =+everywhere= Enables evilified keybinds everywhere possible. Uses the
|
|
||||||
[[https://github.com/emacs-evil/evil-collection][evil-collection]] plugin as a foundation.
|
|
||||||
|
|
||||||
** Plugins
|
** Module flags
|
||||||
+ [[https://github.com/emacs-evil/evil][evil]]
|
- +everywhere ::
|
||||||
+ [[https://github.com/wcsmith/evil-args][evil-args]]
|
Enable evilified keybinds everywhere possible. Uses the [[https://github.com/emacs-evil/evil-collection][evil-collection]] plugin
|
||||||
+ [[https://github.com/PythonNut/evil-easymotion][evil-easymotion]]
|
as a foundation.
|
||||||
+ [[https://github.com/cute-jumper/evil-embrace.el][evil-embrace]]
|
|
||||||
+ [[https://github.com/syl20bnr/evil-escape][evil-escape]]
|
** Packages
|
||||||
+ [[https://github.com/Dewdrops/evil-exchange][evil-exchange]]
|
- [[doom-package:][evil]]
|
||||||
+ [[https://github.com/TheBB/evil-indent-plus][evil-indent-plus]]
|
- [[doom-package:][evil-args]]
|
||||||
+ [[https://github.com/edkolev/evil-lion][evil-lion]]
|
- [[doom-package:][evil-collection]] if [[doom-module:][+everywhere]]
|
||||||
+ [[https://github.com/redguardtoo/evil-nerd-commenter][evil-nerd-commentary]]
|
- [[doom-package:][evil-easymotion]]
|
||||||
+ [[https://github.com/cofi/evil-numbers][evil-numbers]]
|
- [[doom-package:][evil-embrace]]
|
||||||
+ [[https://github.com/noctuid/evil-textobj-anyblock][evil-textobj-anyblock]]
|
- [[doom-package:][evil-escape]]
|
||||||
+ [[https://github.com/hlissner/evil-snipe][evil-snipe]]
|
- [[doom-package:][evil-exchange]]
|
||||||
+ [[https://github.com/emacs-evil/evil-surround][evil-surround]]
|
- [[doom-package:][evil-indent-plus]]
|
||||||
+ [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]]
|
- [[doom-package:][evil-lion]]
|
||||||
+ [[https://github.com/bling/evil-visualstar][evil-visualstar]]
|
- [[doom-package:][evil-nerd-commentary]]
|
||||||
+ [[https://github.com/ninrod/exato][exato]]
|
- [[doom-package:][evil-numbers]]
|
||||||
+ [[https://github.com/emacs-evil/evil-collection][evil-collection]]*
|
- [[doom-package:][evil-quick-diff]]
|
||||||
+ [[https://www.github.com/rgrinberg/evil-quick-diff][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
|
** 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~).
|
setting ~+evil-want-o/O-to-continue-comments~ to ~nil~).
|
||||||
+ In visual mode, =*= and =#= will search for the current selection instead of
|
- In visual mode, [[kbd:][*]] and [[kbd:][#]] will search for the current selection instead of the
|
||||||
the word-at-point.
|
word-at-point.
|
||||||
+ The ~:g[lobal]~ ex command has been modified to highlight matches.
|
- The ~:g[lobal]~ ex command has been modified to highlight matches.
|
||||||
+ More of vim's filename modifiers are supported in ex commands (like ~:p~,
|
- More of vim's filename modifiers are supported in ex commands (like ~:p~,
|
||||||
~:p:h~ or ~:t~) than vanilla evil-mode offers.
|
~: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).
|
project root (throws an error if not in a project).
|
||||||
|
|
||||||
* Prerequisites
|
** TODO Changelog
|
||||||
This module has no external prerequisites.
|
# 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
|
** Ported vim plugins
|
||||||
The following vim plugins have been ported to evil:
|
The following vim plugins have been ported to evil:
|
||||||
|
|
||||||
| Vim Plugin | Emacs Plugin | Keybind(s) |
|
| Vim Plugin | Emacs Plugin | Keybind(s) |
|
||||||
|-----------------------+--------------------------------+--------------------------------------------|
|
|-----------------------+--------------------------------+--------------------------------|
|
||||||
| vim-commentary | evil-nerd-commenter | omap =gc= |
|
| vim-commentary | evil-nerd-commenter | omap [[kbd:][gc]] |
|
||||||
| vim-easymotion | evil-easymotion | omap =gs= |
|
| vim-easymotion | evil-easymotion | omap [[kbd:][gs]] |
|
||||||
| vim-lion | evil-lion | omap =gl= / =gL= |
|
| vim-lion | evil-lion | omap [[kbd:][gl]] / [[kbd:][gL]] |
|
||||||
| vim-seek or vim-sneak | evil-snipe | mmap =s= / =S=, omap =z= / =Z= & =x= / =X= |
|
| 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 =S=, omap =ys= |
|
| 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]] |
|
| 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.
|
This module has also ported vim-unimpaired keybinds to Emacs.
|
||||||
|
|
||||||
In other modules:
|
In other modules:
|
||||||
+ The tools/neotree & tools/treemacs modules provide a =NERDTree= equivalent.
|
- The [[doom-module:][:ui neotree]] & [[doom-module:][:ui treemacs]] modules provide a =NERDTree= equivalent.
|
||||||
+ The editor/multiple-cursors module contains functionality equal to the
|
- The [[doom-module:][:editor multiple-cursors]] module contains functionality equal to the
|
||||||
following vim plugins:
|
following vim plugins:
|
||||||
+ evil-multiedit => vim-multiedit
|
- [[doom-package:][evil-multiedit]] => [[github:hlissner/vim-multiedit][vim-multiedit]]
|
||||||
+ evil-mc => vim-multiple-cursors
|
- [[doom-package:][evil-mc]] => [[https://github.com/terryma/vim-multiple-cursors][vim-multiple-cursors]]
|
||||||
|
|
||||||
** Custom Text Objects
|
** Custom Text Objects
|
||||||
This module provides a couple extra text objects, along with the built-in ones.
|
This module provides a couple extra text objects, along with the built-in ones.
|
||||||
For posterity, here are the built-in ones:
|
For posterity, here are the built-in ones:
|
||||||
|
|
||||||
+ =w W= words
|
- [[kbd:][w W]] words
|
||||||
+ =s= sentences
|
- [[kbd:][s]] sentences
|
||||||
+ =p= paragraphs
|
- [[kbd:][p]] paragraphs
|
||||||
+ =b= parenthesized blocks
|
- [[kbd:][b]] parenthesized blocks
|
||||||
+ =b ( ) { } [ ] < >= braces, parentheses and brackets
|
- [[kbd:][b ( ) { } [ ] < >]] braces, parentheses and brackets
|
||||||
+ =' " `= quotes
|
- [[kbd:][' " `]] quotes
|
||||||
+ =t= tags
|
- [[kbd:][t]] tags
|
||||||
+ =o= symbols
|
- [[kbd:][o]] symbols
|
||||||
|
|
||||||
And these are text objects added by this module:
|
And these are text objects added by this module:
|
||||||
|
- [[kbd:][a]] C-style function arguments (provided by ~evil-args~)
|
||||||
+ =a= C-style function arguments (provided by ~evil-args~)
|
- [[kbd:][B]] any block delimited by braces, parentheses or brackets (provided by
|
||||||
+ =B= any block delimited by braces, parentheses or brackets (provided by
|
|
||||||
~evil-textobj-anyblock~)
|
~evil-textobj-anyblock~)
|
||||||
+ =c= Comments
|
- [[kbd:][c]] Comments
|
||||||
+ =f= For functions (but relies on the major mode to have sane definitions for
|
- [[kbd:][f]] For functions (but relies on the major mode to have sane definitions for
|
||||||
~beginning-of-defun-function~ and ~end-of-defun-function~)
|
~beginning-of-defun-function~ and ~end-of-defun-function~)
|
||||||
+ =g= The entire buffer
|
- [[kbd:][g]] The entire buffer
|
||||||
+ =i j k= by indentation (=k= includes one line above; =j= includes one line
|
- [[kbd:][i j k]] by indentation ([[kbd:][k]] includes one line above; [[kbd:][j]] includes one line above and
|
||||||
above and below) (provided by ~evil-indent-plus~)
|
below) (provided by ~evil-indent-plus~)
|
||||||
+ =q= For quotes (any kind)
|
- [[kbd:][q]] For quotes (any kind)
|
||||||
+ =u= For URLs
|
- [[kbd:][u]] For URLs
|
||||||
+ =x= XML attributes (provided by ~exato~)
|
- [[kbd:][x]] XML attributes (provided by ~exato~)
|
||||||
|
|
||||||
** Custom Ex Commands
|
** Custom Ex Commands
|
||||||
| Ex Command | Description |
|
| 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 |
|
| ~: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 |
|
| ~:tcd[!]~ | Send =cd X= to tmux. X = the project root if BANG, X = ~default-directory~ otherwise |
|
||||||
|
|
||||||
* Configuration
|
* TODO Configuration
|
||||||
** Removing evil-mode
|
#+begin_quote
|
||||||
You must do two things to remove Evil:
|
🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
1. Remove =:editor evil= from =~/.doom.d/init.el=,
|
* Troubleshooting
|
||||||
2. Run ~doom sync~ to clean up lingering dependencies and regenerate your
|
[[doom-report:][Report an issue?]]
|
||||||
|
|
||||||
|
** 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:][<leader> u]].
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
** 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 [[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 [[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 emacs-lisp
|
||||||
|
;; add to $DOOMDIR/config.el
|
||||||
|
(setq! evil-want-Y-yank-to-eol 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.
|
autoloads files.
|
||||||
3. [OPTIONAL] You may want to assign new values to ~doom-leader-alt-key~ and
|
3. [OPTIONAL] Change ~doom-leader-alt-key~ and ~doom-localleader-alt-key~. These
|
||||||
~doom-localleader-alt-key~. These are bound to =C-c= and =C-c l= by default.
|
are bound to [[kbd:][C-c]] and [[kbd:][C-c l]] by default.
|
||||||
|
|
||||||
#+begin_quote
|
#+begin_quote
|
||||||
Ignore ~doom-leader-key~ and ~doom-localleader-key~, they don't apply to
|
🚧 Ignore ~doom-leader-key~ and ~doom-localleader-key~, they don't apply to
|
||||||
non-evil sessions.
|
non-evil sessions.
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
Evil-specific configuration and keybindings (defined with ~map!~) will be
|
Evil-specific configuration and keybindings (defined with ~map!~) will be
|
||||||
ignored without =:editor evil= present (and omitted when byte-compiling).
|
ignored without [[doom-module:][:editor evil]] present (and omitted when byte-compiling).
|
||||||
|
|
||||||
Keep in mind that, at the time of this writing, Doom was designed by a vimmer,
|
* TODO Appendix
|
||||||
for vimmers. Little consideration has been put into designing a keybind scheme
|
#+begin_quote
|
||||||
for vanilla Emacs users (though it's being worked on!).
|
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
||||||
|
#+end_quote
|
||||||
That means that much of Doom's functionality will be orphaned in an evil-less
|
|
||||||
setup. You'll have to set your own keybinds.
|
|
||||||
|
|
||||||
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
|
|
||||||
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)~
|
|
||||||
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$=.
|
|
||||||
|
|
||||||
If you prefer the old behavior, it can be reversed with:
|
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
;; add to ~/.doom.d/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:
|
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
;; add to ~/.doom.d/config.el
|
|
||||||
(setq evil-move-cursor-back nil)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
|
@ -1,83 +1,98 @@
|
||||||
#+TITLE: editor/file-templates
|
← [[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]]
|
||||||
#+DATE: February 11, 2017
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.0
|
#+TITLE: :editor file-templates
|
||||||
#+STARTUP: inlineimages
|
#+SUBTITLE: Fill the void in your empty files
|
||||||
|
#+CREATED: February 11, 2017
|
||||||
|
#+SINCE: 2.0.0
|
||||||
|
|
||||||
* Table of Contents :TOC_2:noexport:
|
* Description :unfold:
|
||||||
- [[#description][Description]]
|
This module adds file templates for blank files, powered by [[doom-package:][yasnippet]].
|
||||||
- [[#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
|
** Maintainers
|
||||||
This module adds file templates for blank files, powered by yasnippet.
|
- [[doom-user:][@hlissner]]
|
||||||
|
|
||||||
** Module Flags
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
This module provides no flags.
|
|
||||||
|
|
||||||
** Plugins
|
** Module flags
|
||||||
This module installs no plugins.
|
/This module has no flags./
|
||||||
|
|
||||||
* Prerequisites
|
** Packages
|
||||||
This module has no prerequisites.
|
/This module doesn't install any packages./
|
||||||
|
|
||||||
* Usage
|
** Hacks
|
||||||
File templates are automatically expanded when opening empty files.
|
- [[doom-package:][yasnippet]]
|
||||||
|
|
||||||
They are also regular yasnippet snippets, which can be expanded by typing their
|
** TODO Changelog
|
||||||
trigger and pressing =TAB=. By convention, the triggers for file templates are
|
# This section will be machine generated. Don't edit it by hand.
|
||||||
prefixed with two underscores ~__~.
|
/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
|
** Inserting OSS licenses
|
||||||
A special command is available for inserting software licenses: ~M-x
|
A special command is available for inserting software licenses: ~M-x
|
||||||
+file-templates/insert-license~.
|
+file-templates/insert-license~.
|
||||||
|
|
||||||
#+begin_quote
|
#+begin_quote
|
||||||
Licenses with a ~-bp~ suffix are boilerplate templates; shorter versions meant
|
📌 Licenses with a ~-bp~ suffix are boilerplate templates; i.e. shorter
|
||||||
for comment headers in code.
|
versions intended for comment headers in code files.
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
* Configuration
|
* TODO Configuration
|
||||||
** Registering a new file template
|
#+begin_quote
|
||||||
Look into the documentation of ~set-file-template!~ and ~set-file-templates!~.
|
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
||||||
** Changing existing file templates
|
#+end_quote
|
||||||
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~.
|
|
||||||
|
|
||||||
So long as these files exist, ~+file-templates/insert-license~ will recognize
|
** Adding new or changing existing file templates
|
||||||
them.
|
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:][<help> 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
|
* Troubleshooting
|
||||||
If a file template isn't expanding where you expect it to, run ~M-x
|
- 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
|
+file-templates/debug~. This will report to you what file template rule would
|
||||||
apply for the correct file.
|
apply for the correct file.
|
||||||
|
|
||||||
* Appendix
|
* 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
|
||||||
|
|
||||||
** API
|
** API
|
||||||
+ ~set-file-template! PRED &rest PLIST~
|
- ~set-file-template! PRED &rest PLIST~
|
||||||
+ ~set-file-templates! &rest TEMPLATES~
|
- ~set-file-templates! &rest TEMPLATES~
|
||||||
|
|
||||||
** Commands
|
** Commands
|
||||||
+ ~+file-templates/insert-license~
|
- ~+file-templates/insert-license~
|
||||||
+ ~+file-templates/debug~
|
- ~+file-templates/debug~
|
||||||
|
|
||||||
** Variables
|
** Variables
|
||||||
+ ~+file-templates-dir~
|
- ~+file-templates-dir~
|
||||||
+ ~+file-templates-default-trigger~
|
- ~+file-templates-default-trigger~
|
||||||
+ ~+file-templates-alist~
|
- ~+file-templates-alist~
|
||||||
|
|
|
@ -1,44 +1,69 @@
|
||||||
#+TITLE: editor/fold
|
← [[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]]
|
||||||
#+DATE: February 17, 2019
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.1
|
#+TITLE: :editor fold
|
||||||
#+STARTUP: inlineimages
|
#+SUBTITLE: What you can't see won't hurt you
|
||||||
|
#+CREATED: May 15, 2019
|
||||||
|
#+SINCE: 2.1
|
||||||
|
|
||||||
* Table of Contents :TOC_3:noexport:
|
* Description :unfold:
|
||||||
- [[#description][Description]]
|
This module marries [[doom-package:][hideshow]], [[doom-package:][vimish-fold]], and ~outline-minor-mode~ to bring you
|
||||||
- [[#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
|
|
||||||
marker, indent and syntax-based code folding for as many languages as possible.
|
marker, indent and syntax-based code folding for as many languages as possible.
|
||||||
|
|
||||||
** Module Flags
|
** Maintainers
|
||||||
This module provides no flags.
|
- [[doom-user:][@hlissner]]
|
||||||
|
|
||||||
** Plugins
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
+ [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]]
|
|
||||||
+ [[https://github.com/matsievskiysv/vimish-fold][vimish-fold]]
|
|
||||||
|
|
||||||
* Prerequisites
|
** Module flags
|
||||||
This module has no prerequisites.
|
/This module has no flags./
|
||||||
|
|
||||||
* Features
|
** Packages
|
||||||
|
- [[doom-package:][evil-vimish-fold]]
|
||||||
|
- [[doom-package:][vimish-fold]]
|
||||||
|
|
||||||
Emacs keybinds when evil +everywhere is disabled.
|
** 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 |
|
| Keybind | Description |
|
||||||
|------------------------+---------------------------|
|
|--------------------+---------------------------|
|
||||||
| =C-c C-f C-f= | Fold region |
|
| [[kbd:][C-c C-f C-f]] | Fold region |
|
||||||
| =C-c C-f C-u= or =C `= | Unfold region |
|
| [[kbd:][C-c C-f C-u]] or [[kbd:][C `]] | Unfold region |
|
||||||
| =C-c C-f C-d= | Delete folded region |
|
| [[kbd:][C-c C-f C-d]] | Delete folded region |
|
||||||
| =C-c C-f C-a C-f= | Fold all regions |
|
| [[kbd:][C-c C-f C-a C-f]] | Fold all regions |
|
||||||
| =C-c C-f C-a C-u= | Unfold all regions |
|
| [[kbd:][C-c C-f C-a C-u]] | Unfold all regions |
|
||||||
| =C-c C-a C-d= | Delete all folded regions |
|
| [[kbd:][C-c C-a C-d]] | Delete all folded regions |
|
||||||
|
|
||||||
* TODO Configuration
|
* TODO Configuration
|
||||||
|
#+begin_quote
|
||||||
|
🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
* Troubleshooting
|
* 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
|
||||||
|
|
|
@ -1,30 +1,17 @@
|
||||||
#+TITLE: editor/format
|
← [[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]]
|
||||||
#+DATE: July 25, 2020
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v3.0.0
|
#+TITLE: :editor format
|
||||||
#+STARTUP: inlineimages nofold
|
#+SUBTITLE: Standardize your ugly code
|
||||||
|
#+CREATED: July 26, 2020
|
||||||
|
#+SINCE: 21.12.0
|
||||||
|
|
||||||
#+begin_quote
|
#+begin_quote
|
||||||
This module has been scheduled for a rewrite. Its documentation will remain
|
🔨 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
|
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]].
|
rewrite can be found [[https://github.com/hlissner/doom-emacs-private/tree/master/modules/editor/format][in my private config]].
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
* Table of Contents :TOC_3:noexport:
|
* Description :unfold:
|
||||||
- [[#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
|
|
||||||
This module integrates code formatters into Emacs. Here are some of the
|
This module integrates code formatters into Emacs. Here are some of the
|
||||||
formatters that it currently supports:
|
formatters that it currently supports:
|
||||||
|
|
||||||
|
@ -37,88 +24,102 @@ rustfmt, scalafmt, script shfmt, snakefmt, sqlformat, styler, swiftformat, tidy
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
** Maintainers
|
** Maintainers
|
||||||
This module has no dedicated maintainers.
|
/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
|
|
||||||
** Module Flags
|
** Module flags
|
||||||
+ =+onsave= Preform buffer-wide reformatting of a buffer when you save it. See
|
- +onsave ::
|
||||||
~+format-on-save-enabled-modes~ to control what major modes to (or not to)
|
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.
|
format on save.
|
||||||
|
|
||||||
** Plugins
|
** Packages
|
||||||
+ [[https://github.com/lassik/emacs-format-all-the-code][format-all]]
|
- [[doom-package:][format-all]]
|
||||||
|
|
||||||
** Hacks
|
** Hacks
|
||||||
+ format-all has been heavily modified to suit Doom's goals for this module:
|
- 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
|
- Reformatted text is applied to the buffer by RCS patch, as to reduce its
|
||||||
affect on cursor position.
|
affect on cursor position.
|
||||||
+ Adds partial formatting, i.e. you can now reformat a subset of the buffer.
|
- 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
|
- 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.
|
pass the universal argument to [[fn:][+format/buffer]] or [[fn:][+format/region]] (i.e.
|
||||||
removes the major-mode lock on formatters).
|
removes the major-mode lock on formatters).
|
||||||
|
|
||||||
* Prerequisites
|
** TODO Changelog
|
||||||
This module depends on external programs to perform the actual formatting. These
|
# This section will be machine generated. Don't edit it by hand.
|
||||||
will need to be installed for them to work. In their absence, =format-all= will
|
/This module does not have a changelog yet./
|
||||||
fail silently.
|
|
||||||
|
|
||||||
+ Angular/Vue (prettier)
|
* Installation
|
||||||
+ Assembly (asmfmt)
|
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
||||||
+ 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 Features
|
This module has no direct requirements, but each language will need one of their
|
||||||
# An in-depth list of features, how to use them, and their dependencies.
|
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
|
** Automatic reformatting when saving buffers
|
||||||
There are two ways to achieve this. Either through the =+onsave= flag, or by
|
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
|
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
|
~+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
|
first item in the list is the symbol ~not~, the list is negated. This is its
|
||||||
default value:
|
default value:
|
||||||
#+BEGIN_SRC elisp
|
#+begin_src emacs-lisp
|
||||||
(setq +format-on-save-enabled-modes
|
(setq +format-on-save-enabled-modes
|
||||||
'(not emacs-lisp-mode ; elisp's mechanisms are good enough
|
'(not emacs-lisp-mode ; elisp's mechanisms are good enough
|
||||||
sql-mode ; sqlformat is currently broken
|
sql-mode ; sqlformat is currently broken
|
||||||
tex-mode ; latexindent is broken
|
tex-mode ; latexindent is broken
|
||||||
latex-mode))
|
latex-mode))
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
If you want to format code when you save a buffer, but want more granular
|
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
|
control over which major modes this behavior is enabled in, there is an
|
||||||
alternative. Make sure =+onsave= is disabled before you try this:
|
alternative. Make sure [[doom-module:][+onsave]] is disabled before you try this:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(add-hook 'python-mode-hook #'format-all-mode)
|
(add-hook 'python-mode-hook #'format-all-mode)
|
||||||
(add-hook 'js2-mode-hook #'format-all-mode)
|
(add-hook 'js2-mode-hook #'format-all-mode)
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
** Disabling the LSP formatter
|
** Disabling the LSP formatter
|
||||||
If you are in a buffer with ~lsp-mode~ enabled and a server that supports
|
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 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
|
** TODO Defining your own formatters
|
||||||
See the ~set-formatter!~ function.
|
See the ~set-formatter!~ function.
|
||||||
|
@ -158,17 +159,24 @@ See the ~set-formatter!~ function.
|
||||||
** TODO Selecting a specific formatter for a particular buffer
|
** TODO Selecting a specific formatter for a particular buffer
|
||||||
Set the buffer-local variable ~+format-with~ to the name of the formatter to
|
Set the buffer-local variable ~+format-with~ to the name of the formatter to
|
||||||
use. e.g.
|
use. e.g.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(setq-hook! 'python-mode-hook +format-with 'html-tidy)
|
(setq-hook! 'python-mode-hook +format-with 'html-tidy)
|
||||||
|
|
||||||
;; Or set it to `:none' to disable formatting
|
;; Or set it to `:none' to disable formatting
|
||||||
(setq-hook! 'python-mode-hook +format-with :none)
|
(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
|
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
|
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]].
|
code]].
|
||||||
|
|
||||||
* Troubleshooting
|
* 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
|
||||||
|
|
57
modules/editor/god/README.org
Normal file
57
modules/editor/god/README.org
Normal file
|
@ -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
|
|
@ -1,18 +1,14 @@
|
||||||
#+TITLE: editor/lispy
|
← [[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]]
|
||||||
#+DATE: October 27, 2018
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.0
|
#+TITLE: :editor lispy
|
||||||
#+STARTUP: inlineimages
|
#+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 :unfold:
|
||||||
- [[#description][Description]]
|
This module adds a keybind scheme for navigating and editing S-expressions in
|
||||||
- [[#prerequisites][Prerequisites]]
|
Lisps; including S-exp awareness for Evil users. This affects the following
|
||||||
- [[#troubleshooting][Troubleshooting]]
|
languages:
|
||||||
- [[#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:
|
|
||||||
|
|
||||||
- Common Lisp
|
- Common Lisp
|
||||||
- Emacs Lisp
|
- Emacs Lisp
|
||||||
|
@ -23,12 +19,43 @@ This includes:
|
||||||
- Clojure
|
- Clojure
|
||||||
- [[https://fennel-lang.org][Fennel]]
|
- [[https://fennel-lang.org][Fennel]]
|
||||||
|
|
||||||
If evil is enabled, lispyville would also be activated for every mode where
|
** Maintainers
|
||||||
lispy is active
|
*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:
|
The default key themes that are set are as follows:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
'((operators normal)
|
'((operators normal)
|
||||||
c-w
|
c-w
|
||||||
(prettify insert)
|
(prettify insert)
|
||||||
|
@ -36,18 +63,25 @@ The default key themes that are set are as follows:
|
||||||
slurp/barf-lispy
|
slurp/barf-lispy
|
||||||
additional
|
additional
|
||||||
additional-insert)
|
additional-insert)
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
To change the key themes set ~lispyville-key-theme~. Think of
|
To change the key themes set ~lispyville-key-theme~. Think of
|
||||||
~lispyville-key-theme~ as the equivalent of ~parinfer-extensions~. See
|
~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
|
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]]).
|
(starting [[https://github.com/noctuid/lispyville#operators-key-theme][here]]).
|
||||||
|
|
||||||
* Prerequisites
|
|
||||||
This module has no prerequisites.
|
|
||||||
|
|
||||||
* Troubleshooting
|
* 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]])
|
** 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
|
lispyville binds [[kbd:][M-[]] to ~lispyville-wrap-brackets~ when the =wrap= or
|
||||||
=additional-wrap= key theme are enabled. In terminal Emacs, this is the key
|
=additional-wrap= key themes are enabled. In terminal Emacs, this is the key
|
||||||
Emacs receives when you scroll with your mouse wheel.
|
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
|
||||||
|
|
80
modules/editor/multiple-cursors/README.org
Normal file
80
modules/editor/multiple-cursors/README.org
Normal file
|
@ -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
|
|
@ -1,23 +1,62 @@
|
||||||
#+TITLE: editor/objed
|
← [[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]]
|
||||||
#+DATE: May 30, 2019
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.1
|
#+TITLE: :editor objed
|
||||||
|
#+SUBTITLE: Text object editing for the innocent
|
||||||
|
#+CREATED: May 30, 2019
|
||||||
|
#+SINCE: 2.1
|
||||||
|
|
||||||
* Table of Contents :TOC_3:noexport:
|
* Description :unfold:
|
||||||
- [[#description][Description]]
|
This modules adds [[doom-package:][objed]], a global minor-mode for navigating and manipulating
|
||||||
- [[#module-flags][Module Flags]]
|
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.
|
||||||
* 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
|
|
||||||
|
|
||||||
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage.
|
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage.
|
||||||
|
|
||||||
** Module Flags
|
** Maintainers
|
||||||
+ ~+manual~ Do not turn =objed= automatically. The user is responsible for calling
|
*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
`objed-activate` (bound to `M-SPC` if using the default Emacs bindings.)
|
|
||||||
|
** 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
|
||||||
|
|
|
@ -1,55 +1,59 @@
|
||||||
#+TITLE: editor/parinfer
|
← [[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]]
|
||||||
#+DATE: June 9, 2018
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.1
|
#+TITLE: :editor parinfer
|
||||||
#+STARTUP: inlineimages nofold
|
#+SUBTITLE: For lispers that like Python more (i.e. nobody)
|
||||||
|
#+CREATED: February 27, 2021
|
||||||
* Table of Contents :TOC_3:noexport:
|
#+SINCE: 2.1
|
||||||
- [[#description][Description]]
|
|
||||||
- [[#maintainers][Maintainers]]
|
|
||||||
- [[#module-flags][Module Flags]]
|
|
||||||
- [[#plugins][Plugins]]
|
|
||||||
- [[#prerequisites][Prerequisites]]
|
|
||||||
- [[#features][Features]]
|
|
||||||
- [[#keybindings][Keybindings]]
|
|
||||||
- [[#configuration][Configuration]]
|
|
||||||
- [[#troubleshooting][Troubleshooting]]
|
|
||||||
|
|
||||||
* Description
|
|
||||||
|
|
||||||
|
* Description :unfold:
|
||||||
Parinfer is a minor mode that aids the writing of Lisp code. It automatically
|
Parinfer is a minor mode that aids the writing of Lisp code. It automatically
|
||||||
infers parenthesis matching and indentation alignment, keeping your code
|
infers parenthesis matching and indentation alignment, keeping your code
|
||||||
balanced and beautiful.
|
balanced and beautiful.
|
||||||
|
|
||||||
Note that the original =parinfer-mode= has been deprecated and superceded by
|
|
||||||
=parinfer-rust-mode=, which has much better performance.
|
|
||||||
|
|
||||||
** Maintainers
|
** 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.
|
* TODO Usage
|
||||||
|
#+begin_quote
|
||||||
* Features
|
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
** Keybindings
|
** Keybindings
|
||||||
|
|
||||||
| Binding | Description |
|
| Binding | Description |
|
||||||
|-------------------+-------------------------------------------|
|
|-----------------+-------------------------------------------|
|
||||||
| ~<localleader> m p~ | Toggle between different inference modes. |
|
| [[kbd:][<localleader> p]] | Toggle between different inference modes. |
|
||||||
| ~<localleader> m P~ | Temporarily disable parinfer. |
|
| [[kbd:][<localleader> P]] | Temporarily disable parinfer. |
|
||||||
|
|
||||||
* Configuration
|
* TODO Configuration
|
||||||
# How to configure this module, including common problems and how to address them.
|
#+begin_quote
|
||||||
|
🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
* Troubleshooting
|
* 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
|
||||||
|
|
|
@ -1,52 +1,79 @@
|
||||||
#+TITLE: editor/rotate-text
|
← [[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]]
|
||||||
#+DATE: October 14, 2021
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.0.4
|
#+TITLE: :editor rotate-text
|
||||||
#+STARTUP: inlineimages nofold
|
#+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 :unfold:
|
||||||
- [[#description][Description]]
|
This module adds text rotation to Doom Emacs. I.e. The ability to cycle through
|
||||||
- [[#maintainers][Maintainers]]
|
keywords or text patterns at point, like ~true~ and ~false~, or ~public~,
|
||||||
- [[#module-flags][Module Flags]]
|
~protected~, and ~private~ (in ~c++-mode~).
|
||||||
- [[#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.
|
|
||||||
|
|
||||||
** Maintainers
|
** Maintainers
|
||||||
# If this module has no maintainers, then...
|
- [[doom-user:][@hlissner]]
|
||||||
This module has no dedicated maintainers.
|
|
||||||
|
|
||||||
** Module Flags
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
# If this module has no flags, then...
|
|
||||||
This module provides no flags.
|
|
||||||
|
|
||||||
** Plugins
|
** Module flags
|
||||||
+ [[https://github.com/debug-ito/rotate-text.el][rotate-text.el]]
|
/This module has no flags./
|
||||||
|
|
||||||
* Prerequisites
|
** Packages
|
||||||
This module has no prerequisites.
|
- [[doom-package:][rotate-text]]
|
||||||
|
|
||||||
* Features
|
** Hacks
|
||||||
# An in-depth list of features, how to use them, and their dependencies.
|
/No hacks documented for this module./
|
||||||
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.
|
|
||||||
|
|
||||||
* Configuration
|
** TODO Changelog
|
||||||
To enable a set of items to cycle through globally, add the following to your configuration
|
# 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
|
#+begin_src emacs-lisp
|
||||||
;; in ~/.doom.d/config.el
|
;; in $DOOMDIR/config.el
|
||||||
(after! rotate-text
|
(after! rotate-text
|
||||||
(pushnew! rotate-text-words '("small" "medium" "large")))
|
(add-to-list 'rotate-text-words '("small" "medium" "large")))
|
||||||
#+end_src
|
#+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
|
#+begin_src emacs-lisp
|
||||||
;; in ~/.doom.d/config.el
|
;; in $DOOMDIR/config.el
|
||||||
(set-rotate-patterns! 'c++-mode
|
(set-rotate-patterns! 'c++-mode
|
||||||
:words '(("float" "double")))
|
: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
|
||||||
|
|
|
@ -1,46 +1,65 @@
|
||||||
#+TITLE: editor/snippets
|
← [[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]]
|
||||||
#+DATE: February 11, 2017
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.0
|
#+TITLE: :editor snippets
|
||||||
#+STARTUP: inlineimages
|
#+SUBTITLE: My elves type so I don't have to
|
||||||
|
#+CREATED: February 11, 2017
|
||||||
|
#+SINCE: 2.0.0
|
||||||
|
|
||||||
* Table of Contents :TOC:
|
* Description :unfold:
|
||||||
- [[#description][Description]]
|
This module adds snippet expansions to Emacs, powered by [[doom-package:][yasnippet]].
|
||||||
- [[#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
|
** Maintainers
|
||||||
This module adds snippets to Emacs, powered by yasnippet.
|
- [[doom-user:][@hlissner]]
|
||||||
|
|
||||||
** Module Flags
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
||||||
This module exposes no flags.
|
|
||||||
|
|
||||||
** Plugins
|
** Module flags
|
||||||
+ [[https://github.com/joaotavora/yasnippet][yasnippet]]
|
/This module exposes no flags./
|
||||||
+ [[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
|
** TODO Hacks
|
||||||
|
#+begin_quote
|
||||||
|
🔨 This module's hacks haven't been documented yet. [[doom-contrib-module:][Document them?]]
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
* Prerequisites
|
** TODO Changelog
|
||||||
This module has no external dependencies.
|
# 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
|
** Disabling the built-in snippets
|
||||||
Don't want to use provided one? Then add this to your private module,
|
#+begin_src emacs-lisp
|
||||||
|
;; in $DOOMDIR/packages.el
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
;; in ~/.doom.d/packages.el
|
|
||||||
(package! doom-snippets :ignore t)
|
(package! doom-snippets :ignore t)
|
||||||
;; If you want to replace it with yasnippet's default snippets
|
;; If you want to replace it with yasnippet's default snippets
|
||||||
(package! yasnippet-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
|
||||||
|
|
|
@ -1,17 +1,81 @@
|
||||||
#+TITLE: editor/word-wrap
|
← [[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]]
|
||||||
#+DATE: August 26, 2019
|
--------------------------------------------------------------------------------
|
||||||
#+SINCE: v2.1
|
#+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 :unfold:
|
||||||
- [[#description][Description]]
|
This module adds a minor-mode [[fn:][+word-wrap-mode]], which intelligently wraps long
|
||||||
- [[#module-flags][Module Flags]]
|
|
||||||
- [[#plugins][Plugins]]
|
|
||||||
- [[#configuration][Configuration]]
|
|
||||||
|
|
||||||
* Description
|
|
||||||
This module adds a minor-mode ~+word-wrap-mode~, which intelligently wraps long
|
|
||||||
lines in the buffer without modifying the buffer content.
|
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,
|
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
|
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
|
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
|
~visual-line-mode~ and not provide any prefix indentation. This is useful for
|
||||||
modes like ~org-mode~ which handle prefix indentation themselves.
|
modes like ~org-mode~ which handle prefix indentation themselves.
|
||||||
|
|
||||||
** Module Flags
|
* Troubleshooting
|
||||||
This module provides no flags.
|
/There are no known problems with this module./ [[doom-report:][Report one?]]
|
||||||
|
|
||||||
** Plugins
|
* Frequently asked questions
|
||||||
+ [[https://elpa.gnu.org/packages/adaptive-wrap.html][adaptive-wrap]]
|
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
||||||
|
|
||||||
* Configuration
|
* TODO Appendix
|
||||||
Word wrapping is not enabled by default.
|
#+begin_quote
|
||||||
|
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
||||||
Wrapping can be toggled in the current buffer with ~M-x +word-wrap-mode~. The
|
#+end_quote
|
||||||
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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue