Merge branch 'develop' of https://github.com/hlissner/doom-emacs into develop

This commit is contained in:
Alex Iverson 2019-03-25 14:51:36 -06:00
commit b3594e55f7
25 changed files with 327 additions and 248 deletions

View file

@ -15,7 +15,7 @@
* :feature
Broad modules that bring essential IDE functionality to Emacs.
+ [[file:feature/debugger/README.org][debugger]]: A (nigh-)universal debugger in Emacs
+ debugger: A (nigh-)universal debugger in Emacs
+ [[file:feature/eval/README.org][eval]]: REPL & code evaluation support for a variety of languages
+ [[file:feature/evil/README.org][evil]] =+everywhere=: Vim in Emacs
+ [[file:feature/file-templates/README.org][file-templates]]: Auto-inserted templates in blank new files
@ -27,8 +27,8 @@ Broad modules that bring essential IDE functionality to Emacs.
Swappable completion modules for quickly narrowing down lists of candidates.
+ [[file:completion/company/README.org][company]] =+auto +childframe=: The ultimate code completion backend
+ [[file:completion/helm/README.org][helm]] =+fuzzy +childframe=: *Another* search engine for love and life
+ [[file:completion/ido/README.org][ido]]: The /other/ *other* search engine for love and life
+ helm =+fuzzy +childframe=: *Another* search engine for love and life
+ ido: The /other/ *other* search engine for love and life
+ [[file:completion/ivy/README.org][ivy]] =+fuzzy +childframe=: /The/ search engine for love and life
* :ui
@ -39,18 +39,18 @@ Aesthetic modules that affect the Emacs interface or user experience.
+ [[file:ui/doom-dashboard/README.org][doom-dashboard]]:
+ [[file:ui/doom-quit/README.org][doom-quit]]:
+ [[file:ui/evil-goggles/README.org][evil-goggles]]:
+ [[file:ui/fci/README.org][fci]]:
+ fci:
+ [[file:ui/hl-todo/README.org][hl-todo]]:
+ [[file:ui/modeline/README.org][modeline]]:
+ [[file:ui/nav-flash/README.org][nav-flash]]:
+ [[file:ui/neotree/README.org][neotree]]:
+ [[file:ui/treemacs/README.org][treemacs]]:
+ treemacs:
+ [[file:ui/popup/README.org][popup]] =+all +defaults=: Makes temporary/disposable windows less intrusive
+ [[file:ui/pretty-code/README.org][pretty-code]]:
+ pretty-code:
+ [[file:ui/tabbar/README.org][tabbar]]:
+ [[file:ui/unicode/README.org][unicode]]:
+ [[file:ui/vc-gutter/README.org][vc-gutter]]:
+ [[file:ui/vi-tilde-fringe/README.org][vi-tilde-fringe]]:
+ vc-gutter:
+ vi-tilde-fringe:
+ [[file:ui/window-select/README.org][window-select]]:
* :editor
@ -59,112 +59,113 @@ Modules that affect and augment your ability to write and edit text.
+ [[file:editor/fold/README.org][fold]]: universal code folding
+ [[file:editor/format/README.org][format]] =+onsave=:
+ [[file:editor/lispy/README.org][lispy]]:
+ [[file:editor/multiple-cursors/README.org][multiple-cursors]]:
+ multiple-cursors:
+ [[file:editor/parinfer/README.org][parinfer]]:
+ [[file:editor/rotate-text/README.org][rotate-text]]:
+ rotate-text:
* :emacs
Modules that reconfigure packages or features built into Emacs
+ [[file:emacs/dired/README.org][dired]] =+ranger +icons=:
+ [[file:emacs/electric/README.org][electric]]:
+ [[file:emacs/eshell/README.org][eshell]]:
+ [[file:emacs/imenu/README.org][imenu]]:
+ [[file:emacs/term/README.org][term]]:
+ [[file:emacs/vc/README.org][vc]]:
+ dired =+ranger +icons=:
+ electric:
+ eshell:
+ imenu:
+ term:
+ vc:
* :tools
Small modules that give Emacs access to external tools & services.
+ [[file:tools/ansible/README.org][ansible]]:
+ [[file:tools/docker/README.org][docker]]:
+ ansible:
+ docker:
+ [[file:tools/editorconfig/README.org][editorconfig]]:
+ [[file:tools/ein/README.org][ein]]:
+ [[file:tools/flyspell/README.org][flyspell]]: Spell checking
+ [[file:tools/flycheck/README.org][flycheck]]: Live error/warning highlights
+ [[file:tools/gist/README.org][gist]]:
+ flyspell: Spell checking
+ flycheck: Live error/warning highlights
+ gist:
+ [[file:tools/lsp/README.org][lsp]]:
+ [[file:tools/macos/README.org][macos]]:
+ [[file:tools/make/README.org][make]]:
+ [[file:tools/magit/README.org][magit]]:
+ [[file:tools/password-store/README.org][password-store]]:
+ [[file:tools/pdf/README.org][pdf]]:
+ [[file:tools/prodigy/README.md][prodigy]]:
+ [[file:tools/rgb/README.org][rgb]]:
+ [[file:tools/terraform/README.org][terraform]]:
+ [[file:tools/tmux/README.org][tmux]]:
+ [[file:tools/upload/README.org][upload]]:
+ macos:
+ make:
+ magit:
+ password-store:
+ pdf:
+ prodigy:
+ rgb:
+ terraform:
+ tmux:
+ upload:
+ [[file:tools/wakatime/README.org][wakatime]]:
+ [[file:tools/vterm/README.org][vterm]]:
+ vterm:
* :lang
Modules that bring support for a language or group of languages to Emacs.
+ [[file:lang/assembly/README.org][assembly]]:
+ assembly:
+ [[file:lang/cc/README.org][cc]] =+lsp=:
+ [[file:lang/clojure/README.org][clojure]]:
+ [[file:lang/common-lisp/README.org][common-lisp]]:
+ clojure:
+ common-lisp:
+ [[file:lang/coq/README.org][coq]]:
+ [[file:lang/crystal/README.org][crystal]]:
+ crystal:
+ [[file:lang/csharp/README.org][csharp]]:
+ [[file:lang/data/README.org][data]]:
+ [[file:lang/erlang/README.org][erlang]]:
+ [[file:lang/elixir/README.org][elixir]]:
+ [[file:lang/elm/README.org][elm]]:
+ [[file:lang/emacs-lisp/README.org][emacs-lisp]]:
+ data:
+ erlang:
+ elixir:
+ elm:
+ emacs-lisp:
+ [[file:lang/ess/README.org][ess]]:
+ [[file:lang/go/README.org][go]] =+lsp=:
+ [[file:lang/haskell/README.org][haskell]] =+intero +dante=:
+ [[file:lang/hy/README.org][hy]]:
+ hy:
+ [[file:lang/idris/README.org][idris]]:
+ [[file:lang/java/README.org][java]] =+meghanada=:
+ java =+meghanada=:
+ [[file:lang/javascript/README.org][javascript]] =+lsp=:
+ [[file:lang/julia/README.org][julia]]:
+ julia:
+ [[file:lang/latex/README.org][latex]]:
+ [[file:lang/ledger/README.org][ledger]]:
+ [[file:lang/lua/README.org][lua]]:
+ [[file:lang/markdown/README.org][markdown]]:
+ ledger:
+ lua:
+ markdown:
+ [[file:lang/nim/README.org][nim]]:
+ [[file:lang/nix/README.org][nix]]:
+ nix:
+ [[file:lang/ocaml/README.org][ocaml]] =+lsp=:
+ [[file:lang/org/README.org][org]] =+attach +babel +capture +export +present +ipython=:
+ [[file:lang/perl/README.org][perl]]:
+ [[file:lang/php/README.org][php]] =+lsp=:
+ [[file:lang/plantuml/README.org][plantuml]]:
+ [[file:lang/purescript/README.org][purescript]]:
+ [[file:lang/python/README.org][python]] =+lsp=:
+ [[file:lang/qt/README.org][qt]]:
+ [[file:lang/racket/README.org][racket]]:
+ plantuml:
+ purescript:
+ python =+lsp=:
+ qt:
+ racket:
+ [[file:lang/rest/README.org][rest]]:
+ [[file:lang/ruby/README.org][ruby]] =+lsp=:
+ ruby =+lsp=:
+ [[file:lang/rust/README.org][rust]] =+lsp=:
+ [[file:lang/scala/README.org][scala]]:
+ scala:
+ [[file:lang/sh/README.org][sh]] =+fish +lsp=:
+ [[file:lang/solidity/README.org][solidity]]:
+ [[file:lang/swift/README.org][swift]]:
+ [[file:lang/web/README.org][web]] =+lsp=:
+ [[file:lang/vala/README.org][vala]]:
+ swift:
+ web =+lsp=:
+ vala:
* :app
Large, opinionated modules that transform and take over Emacs to serve
Large, opinionated modules that transform and take over Emacs, i.e.
Doom-specific porcelains.
+ [[file:app/calendar/README.org][calendar]]:
+ calendar:
+ [[file:app/email/README.org][email]] =+gmail=:
+ [[file:app/irc/README.org][irc]]:
+ [[file:app/regex/README.org][regex]]:
+ [[file:app/rss/README.org][rss]] =+org=:
+ [[file:app/twitter/README.org][twitter]]:
+ regex:
+ rss =+org=:
+ twitter:
+ [[file:app/write/README.org][write]] =+wordnut +langtool=:
* :collab
Modules that enable collaborative programming over the internet.
+ [[file:collab/floobits/README.org][floobits]]:
+ [[file:collab/impatient-mode/README.org][impatient-mode]]:
+ floobits:
+ impatient-mode:
* :config
Modules that configure Emacs one way or another, or focus on making it easier
for you to customize it yourself.
+ [[file:config/literate/README.org][literate]]:
+ literate:
+ [[file:config/default/README.org][default]] =+bindings +smartparens=:

View file

@ -35,7 +35,7 @@ temporary/special buffers in `font-lock-comment-face'."
;; Library
(defun +ivy--switch-buffer-preview ()
(let (ivy-use-virtual-buffers)
(let (ivy-use-virtual-buffers ivy--virtual-buffers)
(counsel--switch-buffer-update-fn)))
(defalias '+ivy--switch-buffer-preview-all #'counsel--switch-buffer-update-fn)

View file

@ -409,8 +409,9 @@
:nv "N" #'evil-mc-make-and-goto-last-cursor
:nv "p" #'evil-mc-make-and-goto-prev-cursor
:nv "P" #'evil-mc-make-and-goto-first-cursor
:nv "q" #'evil-mc-undo-all-cursors
:nv "t" #'+multiple-cursors/evil-mc-toggle-cursors
:nv "u" #'evil-mc-undo-all-cursors
:nv "u" #'evil-mc-undo-last-added-cursor
:nv "z" #'+multiple-cursors/evil-mc-make-cursor-here)
(:after evil-mc
:map evil-mc-key-map

View file

@ -17,6 +17,7 @@
(defvar evil-mc-key-map (make-sparse-keymap))
:config
(global-evil-mc-mode +1)
(setq evil-mc-enable-bar-cursor (not (or IS-MAC IS-WINDOWS)))
(after! smartparens
;; Make evil-mc cooperate with smartparens better

View file

@ -66,10 +66,6 @@ buffers."
;;
;; Commands
;;; these are defined in feature/evil
;;(evil-ex-define-cmd "al[ign]" #'+evil:align)
;;(evil-ex-define-cmd "g[lobal]" #'+evil:global)
;;; Custom commands
;; Editing
(evil-ex-define-cmd "@" #'+evil:macro-on-all-lines) ; TODO Test me
@ -151,7 +147,7 @@ buffers."
;;; Project tools
(evil-ex-define-cmd "compile" #'+evil:compile)
(evil-ex-define-cmd "mak[e]" #'+evil:make)
(evil-ex-define-cmd "debug" #'+debug/run)
;; (evil-ex-define-cmd "debug" #'+debug/run)
(evil-ex-define-cmd "er[rors]" #'flycheck-list-errors)
;;; File operations
@ -161,8 +157,8 @@ buffers."
;;; Sessions/tabs
(evil-ex-define-cmd "sclear" #'+workspace/kill-session)
(evil-ex-define-cmd "sl[oad]" #'+workspace:load-session)
(evil-ex-define-cmd "ss[ave]" #'+workspace:save-session)
(evil-ex-define-cmd "sl[oad]" #'doom/quickload-session)
(evil-ex-define-cmd "ss[ave]" #'doom/quicksave-session)
(evil-ex-define-cmd "tabc[lose]" #'+workspace:delete)
(evil-ex-define-cmd "tabclear" #'doom/kill-all-buffers)
(evil-ex-define-cmd "tabl[ast]" #'+workspace/switch-to-last)

View file

@ -4,26 +4,25 @@
#+STARTUP: inlineimages
* 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]]
- [[A hybrid code-folding system][A hybrid code-folding system]]
- [[Differences from vim][Differences from vim]]
- [[Configuration][Configuration]]
- [[Removing evil-mode][Removing evil-mode]]
- [[#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]]
* Description
This holy module brings the vim experience to Emacs.
** Module Flags
+ =+everywhere= Enables evilified keybinds everywhere possible, utilizing the
~evil-collection~ plugin.
+ =+everywhere= Enables evilified keybinds everywhere possible. Uses the
[[https://github.com/emacs-evil/evil-collection][evil-collection]] plugin as a foundation.
** Plugins
+ [[https://github.com/emacs-evil/evil][evil]]
@ -48,10 +47,9 @@ This holy module brings the vim experience to Emacs.
+ When a window is split, the new window will be focused.
+ The o/O keys will respect and continue commented lines (can be disabled by
setting ~+evil-want-o/O-to-continue-comments~ to ~nil~).
+ From visual mode, =*= and =#= will search for the current selection instead of
+ 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
incrementally.
+ 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
@ -64,64 +62,115 @@ This module has no external prerequisites.
** Ported vim plugins
The following vim plugins have been ported to evil:
| Vim Plugin | Emacs Plugin | Keybind(s) |
|-----------------------+--------------------------------+---------------------|
| vim-commentary | evil-commentary | omap =gc= |
| vim-easymotion | evil-easymotion | omap =gs= |
| vim-seek or vim-sneak | evil-snipe | mmap =s=/=S= |
| vim-surround | evil-embrace and evil-surround | vmap =S=, omap =ys= |
| Vim Plugin | Emacs Plugin | Keybind(s) |
|-----------------------+--------------------------------+--------------------------------------|
| vim-commentary | evil-commentary | omap =gc= |
| vim-easymotion | evil-easymotion | omap =gs= |
| 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= |
In other modules:
+ The tools/neotree & tools/treemacs modules contain a =NERDTree= equivalent.
+ The editor/multiple-cursors module contains:
+ ~vim-multiedit~ => evil-multiedit
+ ~vim-multiple-cursors~ => evil-mc
+ The tools/neotree & tools/treemacs modules provide a =NERDTree= equivalent.
+ The editor/multiple-cursors module contains functionality equal to the
following vim plugins:
+ evil-multiedit => vim-multiedit
+ evil-mc => vim-multiple-cursors
** Custom Text Objects
+ A list of new text objects:
+ Blocks: ~B~ (from ~evil-textobj-anyblock~)
+ Args: ~a~ (from ~evil-args~)
+ Indentation: ~i~ / ~I~ / ~J~ (from ~evil-indent-plus~)
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
And these are text objects added by this module:
+ =B= any block delimited by braces, parentheses or backets (provided by
~evil-textobj-anyblock~)
+ =a= C-style fucntion arguments (provided by ~evil-args~)
+ =i I J= By indentation (I includes on line above and J includes one line
below) (provided by ~evil-indent-plus~)
+ =x= XML attributes (provided by ~exato~)
** Custom Ex Commands
| Ex Command | Description |
|----------------------+----------------------------------------------------------------------------------|
| ~:al[ign][!] REGEXP~ | Align text to the first match of REGEXP. If BANG, align all matches on each line |
| ~:mv[!] NEWPATH~ | Move the current file to NEWPATH |
| ~:cp[!] NEWPATH~ | Copy the current file to NEWPATH |
| ~:rm[!] [PATH]~ | Delete the current buffer's file and buffer |
** A hybrid code-folding system
This module combines ~vimish-fold~ and ~hideshow~. The former allows arbitrary
folds and the latter allows folds on markers and indentation. Together, they
create a more consistent (and feature-complete) code-folding system.
Most vim folding keys should work, e.g. =zr=, =zm=, =za=, =zo=, etc.
** Differences from vim
+ Column-wise ranges in ex commands are enabled by default. i.e. the range in
=:'<,'>s/a/b= will only affects the visual selection, not full lines (see
~evil-ex-visual-char-range~).
+ =:g= will incrementally highlight buffer matches.
| Ex Command | Description |
|----------------------+--------------------------------------------------------------------------------------|
| ~:@~ | Apply macro on selected lines |
| ~:ag[!] REGEXP~ | Perform a project search with ag |
| ~:agcwd[!] REGEXP~ | Perform a project search with ag |
| ~:al[ign] REGEXP~ | Align text that matches REGEXP |
| ~:al[ign][!] REGEXP~ | Align text to the first match of REGEXP. If BANG, align all matches on each line |
| ~:cp[!] NEWPATH~ | Copy the current file to NEWPATH |
| ~:dash QUERY~ | Look up QUERY (or the symbol at point) in dash docsets |
| ~:dehtml [INPUT]~ | HTML decode selected text / inserts result if INPUT is given |
| ~:enhtml [INPUT]~ | HTML encode selected text / inserts result if INPUT is given |
| ~:grep[!]~ | Perform a project search with git-grep |
| ~:grepcwd[!]~ | Perform a project search with git-grep |
| ~:iedit REGEXP~ | Invoke iedit on all matches for REGEXP |
| ~:k[ill]all[!]~ | Kill all buffers (if BANG, affect buffer across workspaces) |
| ~:k[ill]b~ | Kill all buried buffers |
| ~:k[ill]m[!] REGEXP~ | Kill buffers whose name matches REGEXP (if BANG, affect buffers across workspaces) |
| ~:k[ill]o~ | Kill all other buffers besides the selected one |
| ~:k[ill]~ | Kill the current buffer |
| ~:lo[okup] QUERY~ | Look up QUERY on an online search engine |
| ~:mc REGEXP~ | Invoke multiple cursors on all matches for REGEXP |
| ~:mv[!] NEWPATH~ | Move the current file to NEWPATH |
| ~:na[rrow]~ | Narrow the buffer to the selection |
| ~:pad~ | Open a scratch pad for running code quickly |
| ~:pt[!]~ | Perform a project search with pt |
| ~:ptcwd[!]~ | Perform a project search with pt |
| ~:ral[ign] REGEXP~ | Right-align text that matches REGEXP |
| ~:repl~ | Open a REPL and/or copy the current selection to it |
| ~:retab~ | Convert indentation to the default within the selection |
| ~:rev[erse]~ | Reverse the selected lines |
| ~:rg[!]~ | Perform a project search with ripgrep |
| ~:rgcwd[!]~ | Perform a project search with rigprep |
| ~: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 =:feature evil= from =~/.doom.d/init.el=,
2. Run ~bin/doom refresh~ to clean up lingering dependencies and refresh yuor
2. Run ~doom refresh~ to clean up lingering dependencies and refresh yuor
autoloads files.
3. [OPTIONAL] You may want a new ~doom-leader-alt-key~ and
~doom-localleader-alt-key~. By default, these are bound to =M-SPC= and =M-SPC
m=.
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.
#+begin_quote
Ignore ~doom-leader-key~ and ~doom-localleader-key~, they don't apply to
non-evil sessions.
#+end_quote
Note that evil-specific configuration and keybinds (defined with ~map!~) will be
ignored without evil present (and stripped out when byte-compiling).
Evil-specific configuration and keybindings (defined with ~map!~) will be
ignored without =:feature evil= present (and omitted when byte-compiling).
Unfortunately, since Doom was designed by a vimmer, for vimmers, little
consideration into a keybinding scheme for vanilla Emacs users.
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!).
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 ~(after! evil-snipe (evil-snipe-mode
-1))~ 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.

View file

@ -10,7 +10,7 @@ to a pop up buffer."
(require 'pp)
(let ((result
(let ((debug-on-error t)
(doom--current-module (doom-module-from-path buffer-file-name)))
(doom--current-module (ignore-errors (doom-module-from-path buffer-file-name))))
(eval (read
(concat "(progn "
(buffer-substring-no-properties beg end)

View file

@ -124,6 +124,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
(def-package! elisp-demos
:defer t
:init
(advice-add 'describe-function-1 :after #'elisp-demos-advice-describe-function-1)
(advice-add 'helpful-update :after #'elisp-demos-advice-helpful-update))

View file

@ -160,14 +160,15 @@
;; navigation
(set-lookup-handlers! 'tide-mode :async t
:definition #'tide-jump-to-definition
:references #'tide-references
:documentation #'tide-documentation-at-point)
:references #'tide-references)
;; resolve to `doom-project-root' if `tide-project-root' fails
(advice-add #'tide-project-root :override #'+javascript*tide-project-root)
;; cleanup tsserver when no tide buffers are left
(add-hook! 'tide-mode-hook
(add-hook 'kill-buffer-hook #'+javascript|cleanup-tide-processes nil t))
(define-key tide-mode-map [remap +lookup/documentation] #'tide-documentation-at-point)
(map! :localleader
:map tide-mode-map
"R" #'tide-restart-server

View file

@ -76,6 +76,7 @@
(add-hook 'org-load-hook #'+org|setup-evil-keybinds)
(add-hook 'evil-org-mode-hook #'evil-normalize-keymaps)
:config
(add-hook 'org-open-at-point-functions #'evil-set-jump)
;; change `evil-org-key-theme' instead
(advice-add #'evil-org-set-key-theme :override #'ignore)
(def-package! evil-org-agenda

View file

@ -114,7 +114,7 @@ PLIST can have the following properties:
return t)))
#'+doom-dashboard-initial-buffer))
(add-hook 'doom-init-ui-hook #'+doom-dashboard|init)
(add-hook 'doom-init-ui-hook #'+doom-dashboard|init 'append)
;;

View file

@ -27,6 +27,7 @@
:init
(unless doom-theme
(setq doom-theme 'doom-one))
:config
;; improve integration w/ org-mode
(add-hook 'doom-load-theme-hook #'doom-themes-org-config)
;; more Atom-esque file icons for neotree/treemacs

View file

@ -1,50 +1,59 @@
#+TITLE: :feature popup
#+TITLE: :ui popup
This module provides a highly customizable popup window management system.
* Table of Contents :TOC:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#prerequisites][Prerequisites]]
- [[#configuration][Configuration]]
- [[#set-popup-rule-and-set-popup-rules][~set-popup-rule!~ and ~set-popup-rules!~]]
- [[#disabling-aggressive-mode-line-hiding-in-popups][Disabling aggressive mode-line hiding in popups]]
- [[#appendix][Appendix]]
- [[#commands][Commands]]
- [[#library][Library]]
- [[#hacks][Hacks]]
* Description
This module provides a customizable popup window management system.
#+begin_quote
Not all windows are created equally. Some are less important. Some I want gone
once they have served their purpose, like code output or a help buffer. Others I
want to stick around, like a scratch buffer or org-capture popup.
More than that, popups ought to be be the second class citizens of my editor;
spawned off to the side, discarded with the simple push of a button
(Escape/C-g), and easily restored if I want to see them again. Of course, this
system should clean up after itself and kill off buffers I mark as transient.
#+end_quote
spawned off to the side, discarded with the push of a button (e.g. =ESC= or
=C-g=), and easily restored if I want to see them again. Of course, this system
should clean up after itself and kill off buffers I mark as transient.
* Table of Contents :TOC:
- [[Configuration][Configuration]]
- [[~set-popup-rules!~][~set-popup-rules!~]]
- [[Disabling aggressive mode-line hiding in popups][Disabling aggressive mode-line hiding in popups]]
- [[Appendix][Appendix]]
- [[Commands][Commands]]
- [[Library][Library]]
- [[Hacks][Hacks]]
** Module Flags
+ =+all= Enables fallback rules to ensure all temporary/special buffers (whose
name begins with a space or asterix) are treated as popups.
+ =+defaults= Enables reasonable default popup rules for a variety of buffers.
* Prerequisites
This module has no external prerequisites.
* Configuration
** ~set-popup-rules!~
This module has one setting for defining your own rules for popups:
** ~set-popup-rule!~ and ~set-popup-rules!~
This module has two functions for defining your own rules for popups:
#+BEGIN_SRC emacs-lisp
(set-popup-rule! PREDICATE &key IGNORE ACTIONS SIDE SIZE WIDTH HEIGHT SLOT VSLOT TTL QUIT SELECT MODELINE AUTOSAVE PARAMETERS)
(set-popup-rules! &rest RULESETS)
#+END_SRC
+ ~RULESETS~ consist of a function or regexp string that matches the buffer's
name, and a list of settings. See ~display-buffer~'s,
~display-window-parameters~'s, and ~+popup-window-parameters~'s documentation
for what parameters are supported.
~PREDICATE~ is a predicate function or regexp string to match against the
buffer's name. To see what the other keywords do, check out the documentation
for ~set-popup-rule!~ (=SPC h f set-popup-rule!=).
#+begin_quote
Rules are added to ~display-buffer-alist~, which instructs ~display-buffer~
calls on how to set up windows for buffers that meet certain conditions.
#+begin_quote
The ~switch-to-buffer~ command (and its ~switch-to-buffer-*~ variants) are not
affected by ~display-buffer-alist~.
#+end_quote
Here are a couple example rules:
e.g.
#+BEGIN_SRC emacs-lisp
(set-popup-rules!
'(("^ \\*" :slot -1) ; fallback rule for special buffers
@ -57,25 +66,27 @@ Here are a couple example rules:
#+END_SRC
Omitted parameters in a ~set-popup-rules!~ will use the defaults set in
~+popup-default-alist~ and ~+popup-default-parameters~.
~+popup-defaults~.
** Disabling aggressive mode-line hiding in popups
There are two ways to go about this. You can turn on modelines by changing the
default ~'modeline~ window parameter in ~+popup-default-parameters~:
There are two ways to go about this.
#+BEGIN_SRC emacs-lisp
;; put in private/$USER/config.el
(map-put +popup-default-parameters 'modeline t)
#+END_SRC
1. Turn on modelines by changing the ~:modeline~ property in ~+popup-defaults~:
This will ensure all popups have a modeline /by default/, but allows you to override this on a per-popup basis.
#+BEGIN_SRC emacs-lisp
;; put in private/$USER/config.el
(map-put +popup-defaults :modeline t)
#+END_SRC
*Alternatively*, you can disable modeline-hiding entirely:
This will ensure all popups have a modeline /by default/, but allows you to
override this on a per-popup basis.
#+BEGIN_SRC emacs-lisp
;; put in private/$USER/config.el
(remove-hook '+popup-buffer-mode-hook '+popup|set-modeline)
#+END_SRC
2. Disable modeline-hiding entirely:
#+BEGIN_SRC emacs-lisp
;; in ~/.doom.d/config.el
(remove-hook '+popup-buffer-mode-hook #'+popup|set-modeline-on-enable)
#+END_SRC
* Appendix
** Commands

View file

@ -166,7 +166,9 @@ PLIST can be made up of any of the following properties:
An alist of custom window parameters. See `(elisp)Window Parameters'.
If any of these are omitted, defaults derived from `+popup-defaults' will be
used."
used.
\(fn PREDICATE &key IGNORE ACTIONS SIDE SIZE WIDTH HEIGHT SLOT VSLOT TTL QUIT SELECT MODELINE AUTOSAVE PARAMETERS)"
(declare (indent defun))
(push (+popup--make predicate plist) +popup--display-buffer-alist)
(when (bound-and-true-p +popup-mode)