v2.0.7 release

Merge branch 'develop'

* develop: (67 commits)
  org/org: minor refactor/cleanup
  Appease byte-compiler: org-table-p => org-at-table-p
  Add no-byte-compile to completion/company unit test file
  v2.0.7 bump
  Clean up legacy comments
  Add org/org/autoload/org-link.el
  ui/doom-modeline: minor refactor of paths
  doom--display-benchmark => doom-packages--display-benchmark
  Run doom//reload-autoloads in separate session
  Don't autofit special popups by default
  doom--module-paths => doom-module-paths
  doom--module-pairs => doom-module-pairs
  Revise project readme
  Add docstring to doom//byte-compile-core
  Start tab numbering from 1 instead of 0 #262
  Add --quick to Emacs batch calls (experimental)
  Rewrite bin/org-tangle
  Use -- to delimit arguments
  Remove debug code in +jump/definition
  org/org-babel: minor refactor
  ...
This commit is contained in:
Henrik Lissner 2017-11-09 00:36:38 +01:00
commit e21253cd06
66 changed files with 1294 additions and 838 deletions

View file

@ -10,6 +10,53 @@
- [[#200-jan-17-2017][2.0.0 (Jan 17, 2017)]] - [[#200-jan-17-2017][2.0.0 (Jan 17, 2017)]]
* Unreleased (develop) * Unreleased (develop)
+ *Module changes:*
+ Split =lang/java= into two submodules: one for eclim, and another for
meghanada. The latter is still the default, however. Also, the eclim
submodule is experimental, since I have few opportunities to test it.
+ Add =ui/window-select= (and moved ace-window out of ~core-ui~), which offers
two submodules for interactive window selection/moving: ace-window and
switch-window.
+ =general=
+ New command naming convention: ~doom//...~ -- denotes that this an
interactive command meant for:
+ Altering or maintaining your Emacs configuration itself.
+ And can be safely called through a batch session on the command line. E.g.
~emacs --batch -f doom//some-command~.
+ New macro for defining fuzzy-find menus (powered by whatever completion
engine you have active): ~def-menu!~.
+ Autoload files can now specify a predicate cookie to tell the
compiler/autoload reader whether or not to ignore that file. They look like
~;;;###if (featurep! :feature evil)~.
+ =core-keybinds= Add :g flag to ~map!~ for defining global keybinds along
with vim keybinds, so you don't have to repeat yourself, just for a global
binding.
+ =core-packages= Fix an issue where Doom's package management system wouldn't
know what to do with a package that was initially installed with one backend
(e.g. ELPA), and whose ~package!~ definition was later changed so that it
should be handled by another (e.g. QUELPA). This would cause "FAILED" error
messages while trying to install or update these packages (see [[https://github.com/hlissner/doom-emacs/issues/222][#222]]).
+ =feature=
+ =file-templates= Disable file templates for .dir-locals.el files.
+ =jump= New command ~+jump/online-select~, which is like ~+jump/online~, but
will always prompt for which provider to use.
+ =ui=
+ =doom= This module no longer sets a default font. This is left to the user
to set in their own private module. Use ~(set! :font "Font Name" :size N)~
to do so.
+ =lang=
+ =sh=
+ Improve how variables and subshells in double-quoted strings are
fontified.
+ Fix imenu not recognizing functions with dashes in their names.
+ =java=
+ Polished meghanada-mode integration.
+ New (and optional) +eclim submodule and module flag.
+ =rust=
+ Now checks the ~RUST_SRC_PATH~ environment variable before looking for
Rust's source in ~+rust-src-dir~.
+ Now looks for a ~racer~ binary in ~PATH~ before looking in
~+rust-src-dir~.
* 2.0.6 (Oct 05, 2017) * 2.0.6 (Oct 05, 2017)
+ *Module changes:* + *Module changes:*
@ -122,199 +169,314 @@
* 2.0.5 (Sep 03, 2017) * 2.0.5 (Sep 03, 2017)
+ =doom= + =doom=
+ Added new module: ~tools/rgb~, with tools for dealing with colors (thanks to [[https://github.com/bandresen][bandresen]]) + Added new module: ~tools/rgb~, with tools for dealing with colors (thanks to
+ Added new module: ~tools/prodigy~, with tools for managing external services (thanks to [[https://github.com/bandresen][bandresen]]) [[https://github.com/bandresen][bandresen]])
+ Added new module: ~feature/hydra~, offers an extra and customizable layer of modal keybinds (thanks to [[https://github.com/bandresen][bandresen]]) + Added new module: ~tools/prodigy~, with tools for managing external services
(thanks to [[https://github.com/bandresen][bandresen]])
+ Added new module: ~feature/hydra~, offers an extra and customizable layer of
modal keybinds (thanks to [[https://github.com/bandresen][bandresen]])
+ Added two new core-lib helpers for macros: ~doom-enlist~ and ~doom-unquote~. + Added two new core-lib helpers for macros: ~doom-enlist~ and ~doom-unquote~.
+ Switch to ~doom-fallback-buffer~ after using ~doom/kill-all-buffers~ (or ~:killall!~). + Switch to ~doom-fallback-buffer~ after using ~doom/kill-all-buffers~ (or
+ ~make doctor~ now does font detection and will complain when fonts are missing. ~:killall!~).
+ When switching to a new project, a new workspace is spawned and a fuzzy find-file prompt is opened. However, a buffer from the previous workspace would linger on screen *and* the scratch buffer would CD to HOME, rather than the project root. This is fixed now. + ~make doctor~ now does font detection and will complain when fonts are
+ Added module flags to the ~doom!~ macro in init.el, and modified the ~featurep!~ macro so that it can be used to detect these flags from within modules. It is up to modules how to interpret them. More information in [[https://github.com/hlissner/.emacs.d/commit/0b7b8800a2478588bde408c92fcdfa0e43a5baf0][0b7b880]]. missing.
+ Fix projectile-find-file not respecting ~default-directory~ (caused by changes upstream). + When switching to a new project, a new workspace is spawned and a fuzzy
+ Rewrote, revised and expanded module documentation, and created a [[https://github.com/hlissner/.emacs.d/wiki][wiki]] with more information. find-file prompt is opened. However, a buffer from the previous workspace
would linger on screen *and* the scratch buffer would CD to HOME, rather
than the project root. This is fixed now.
+ Added module flags to the ~doom!~ macro in init.el, and modified the
~featurep!~ macro so that it can be used to detect these flags from within
modules. It is up to modules how to interpret them. More information in
[[https://github.com/hlissner/.emacs.d/commit/0b7b8800a2478588bde408c92fcdfa0e43a5baf0][0b7b880]].
+ Fix projectile-find-file not respecting ~default-directory~ (caused by
changes upstream).
+ Rewrote, revised and expanded module documentation, and created a [[https://github.com/hlissner/.emacs.d/wiki][wiki]] with
more information.
+ Removed the =:L= flag from =map!= and replaced it with a =:local= property. + Removed the =:L= flag from =map!= and replaced it with a =:local= property.
+ Added new function: ~doom|disable-vi-tilde-fringe~ for turning off vi-tilde-fringe in select buffers. + Added new function: ~doom|disable-vi-tilde-fringe~ for turning off
+ Added support for relative line numbers (see ~doom-line-numbers-style~), using nlinum-relative on Emacs <26, and display-line-numbers on Emacs 26+. vi-tilde-fringe in select buffers.
+ Added support for relative line numbers (see ~doom-line-numbers-style~),
using nlinum-relative on Emacs <26, and display-line-numbers on Emacs 26+.
+ =feature= + =feature=
+ =file-templates= Added a file template for: + =file-templates= Added a file template for:
+ *.org files + *.org files
+ Module README.org files. + Module README.org files.
+ =jump= + =jump=
+ Added documentation for ~:jump~ setting, describing the three properties it supports (~:definition~, ~:references~ and ~:documentation~). + Added documentation for ~:jump~ setting, describing the three properties
it supports (~:definition~, ~:references~ and ~:documentation~).
+ Rewrote ~+jump/online~ to: + Rewrote ~+jump/online~ to:
+ Use the current selection, if active, or prompt for a query otherwise (with the thing at point as the initial input). + Use the current selection, if active, or prompt for a query otherwise
+ Prompts for the provider (search engine) on first use, and reuses the last provider on consecutive uses. If the universal argument is supplied, force ~+jump/online~ to prompt for the provider anyway. (with the thing at point as the initial input).
+ =workspaces= Fix interactive renaming of workspaces, as well as the ability to save and load workspaces from files (see [[https://github.com/hlissner/doom-emacs/pull/200][#200]]). + Prompts for the provider (search engine) on first use, and reuses the
last provider on consecutive uses. If the universal argument is
supplied, force ~+jump/online~ to prompt for the provider anyway.
+ =workspaces= Fix interactive renaming of workspaces, as well as the ability
to save and load workspaces from files (see [[https://github.com/hlissner/doom-emacs/pull/200][#200]]).
+ =completion= + =completion=
+ Added all-the-icons support to ~ivy-switch-buffer~ and ~+ivy/switch-workspace-buffer~. Enable this with ~(setq +ivy-buffer-icons t)~. + Added all-the-icons support to ~ivy-switch-buffer~ and
~+ivy/switch-workspace-buffer~. Enable this with ~(setq +ivy-buffer-icons
t)~.
+ =ui= + =ui=
+ rainbow-mode is no longer activated on ~prog-mode-hook~. + rainbow-mode is no longer activated on ~prog-mode-hook~.
+ =doom-modeline= + =doom-modeline=
+ Modeline now uses shrink-path.el to shrink the buffer name in the case of a small frame (thanks to [[https://github.com/bandresen][bandresen]]). [[https://github.com/hlissner/.emacs.d/pull/176][See #176]] + Modeline now uses shrink-path.el to shrink the buffer name in the case of
a small frame (thanks to [[https://github.com/bandresen][bandresen]]). [[https://github.com/hlissner/.emacs.d/pull/176][See #176]]
+ Fixed mode-line going blank in terminal Emacs (thanks to [[https://github.com/bandresen][bandresen]]). + Fixed mode-line going blank in terminal Emacs (thanks to [[https://github.com/bandresen][bandresen]]).
+ =doom-dashboard= Fixed "Load last session" button on dashboard. + =doom-dashboard= Fixed "Load last session" button on dashboard.
+ =tools= + =tools=
+ =eshell= General improvements made to further integrate eshell with Doom (thanks to [[https://github.com/bandresen][bandresen]]). [[https://github.com/hlissner/.emacs.d/pull/160][See #160]] + =eshell= General improvements made to further integrate eshell with Doom
+ =pass= ~+pass-get-field~ now no-ops if used in a non-interactive session (e.g. during testing or byte compilation). (thanks to [[https://github.com/bandresen][bandresen]]). [[https://github.com/hlissner/.emacs.d/pull/160][See #160]]
+ =neotree= Add =r= and =d= bindings for renaming and deleting files, respectively. + =pass= ~+pass-get-field~ now no-ops if used in a non-interactive session
(e.g. during testing or byte compilation).
+ =neotree= Add =r= and =d= bindings for renaming and deleting files,
respectively.
+ =lang= + =lang=
+ =cc= The advise function ~c-lineup-arglist~ was missing, and has now been reimplemented. + =cc= The advise function ~c-lineup-arglist~ was missing, and has now been
+ =haskell= With module flags implemented, Intero support is now available to lang/haskell and is now the default. Dante support is still available with the ~+dante~ flag. reimplemented.
+ =java= Now auto-installs meghanda-server on first use, and fixed code-completion in java buffers. + =haskell= With module flags implemented, Intero support is now available to
lang/haskell and is now the default. Dante support is still available with
the ~+dante~ flag.
+ =java= Now auto-installs meghanda-server on first use, and fixed
code-completion in java buffers.
+ =org= + =org=
+ Fixed vanilla C-j/C-k bindings overshadowing custom window navigation bindings. + Fixed vanilla C-j/C-k bindings overshadowing custom window navigation
bindings.
+ Added C-[hjkl] keybindings in insert mode for org table navigation. + Added C-[hjkl] keybindings in insert mode for org table navigation.
+ Fixed ~+org/insert-item~ throwing =save-excursion: Wrong type argument: listp, 1= error when used from BOL on the first sub-item in a list. + Fixed ~+org/insert-item~ throwing =save-excursion: Wrong type argument:
listp, 1= error when used from BOL on the first sub-item in a list.
* 2.0.4 (Jul 14, 2017) * 2.0.4 (Jul 14, 2017)
+ *Module changes:* + *Module changes:*
+ Added =tools/password-store= -- Emacs as a password manager, using [[https://www.passwordstore.org/][pass]] as a backend (contributed by [[https://github.com/bandresen][brandresen]]). + Added =tools/password-store= -- Emacs as a password manager, using [[https://www.passwordstore.org/][pass]] as a
+ Added =app/irc= -- Emacs as an IRC client, using circe (contributed by [[https://github.com/bandresen][brandresen]]). backend (contributed by [[https://github.com/bandresen][brandresen]]).
+ Added =app/irc= -- Emacs as an IRC client, using circe (contributed by
[[https://github.com/bandresen][brandresen]]).
+ ~+pass/ivy~ for ivy integration, with edit/copy field/open url actions. + ~+pass/ivy~ for ivy integration, with edit/copy field/open url actions.
+ ~helm-pass~ for helm integration. + ~helm-pass~ for helm integration.
+ Added =lang/hy= -- support for [[http://hylang.org][hylang]], a combination of Lisp and Python (thanks to [[https://github.com/bandresen][bandresen]]). + Added =lang/hy= -- support for [[http://hylang.org][hylang]], a combination of Lisp and Python
(thanks to [[https://github.com/bandresen][bandresen]]).
+ Added =lang/ocaml= -- support for [[https://ocaml.org/][OCAML]] (thanks to [[https://github.com/Ptival][Ptival]]) + Added =lang/ocaml= -- support for [[https://ocaml.org/][OCAML]] (thanks to [[https://github.com/Ptival][Ptival]])
+ Added =lang/plantuml= -- drawing diagrams in plain text + Added =lang/plantuml= -- drawing diagrams in plain text
+ Added =lang/perl= -- Perl6 support for Emacs + Added =lang/perl= -- Perl6 support for Emacs
+ Added =ui/tabbar= -- add tabs to Doom via [[https://github.com/dholm/tabbar][tabbar]] (I don't recommend using it) + Added =ui/tabbar= -- add tabs to Doom via [[https://github.com/dholm/tabbar][tabbar]] (I don't recommend using
it)
+ Removed =lang/org= + Removed =lang/org=
+ Added =org= -- a new module category for org and org extensions + Added =org= -- a new module category for org and org extensions
+ Removed =app/present= (replaced mostly with =org/org-present=) + Removed =app/present= (replaced mostly with =org/org-present=)
+ =org/org-babel= -- executable code snippets in org-mode, with support for a variety of languages. + =org/org-babel= -- executable code snippets in org-mode, with support for
a variety of languages.
+ =org/org-capture= -- a better org-capture, in or outside of Emacs. + =org/org-capture= -- a better org-capture, in or outside of Emacs.
+ =org/org-export= -- a centralized export system with more export backends. + =org/org-export= -- a centralized export system with more export backends.
+ =org/org-notebook= -- org-mode as a general notebook. + =org/org-notebook= -- org-mode as a general notebook.
+ =org/org-present= -- org-mode for presentations. + =org/org-present= -- org-mode for presentations.
+ Added =tools/impatient-mode= -- show off live buffers via HTTP. + Added =tools/impatient-mode= -- show off live buffers via HTTP.
+ =core= + =core=
+ New variable: ~doom-host-dir~, as a base path for ~doom-etc-dir~ and ~doom-cache-dir~. + New variable: ~doom-host-dir~, as a base path for ~doom-etc-dir~ and
+ New hooks: ~doom-init-hook~ and ~doom-post-init-hook~, which are run on ~emacs-startup-hook~. This is meant to simplify post-Emacs initialization hooks (~after-init-hook~, ~emacs-startup-hook~ and ~window-setup-hook~) into two unambiguous ones. ~doom-cache-dir~.
+ Fix =private/<user-login-name>/init.el= not being auto-loaded when the user's private module is absent in the root init.el file. + New hooks: ~doom-init-hook~ and ~doom-post-init-hook~, which are run on
+ Improve error handling across the board. Emacs should now report more helpful errors. Catastrophic errors will be less likely to inhibit later modules from being loaded. ~emacs-startup-hook~. This is meant to simplify post-Emacs initialization
hooks (~after-init-hook~, ~emacs-startup-hook~ and ~window-setup-hook~) into
two unambiguous ones.
+ Fix =private/<user-login-name>/init.el= not being auto-loaded when the
user's private module is absent in the root init.el file.
+ Improve error handling across the board. Emacs should now report more
helpful errors. Catastrophic errors will be less likely to inhibit later
modules from being loaded.
+ Unit-tests have been moved to their respective modules (and =core/test/=). + Unit-tests have been moved to their respective modules (and =core/test/=).
+ Fix ~def-setting!~ to act more like ~defmacro~; don't aggressively evaluate its arguments on expansion. + Fix ~def-setting!~ to act more like ~defmacro~; don't aggressively evaluate
+ New function: ~doom-set-buffer-real BUFFER FLAG~ -- makes Doom consider BUFFER real, no matter what. its arguments on expansion.
+ Add INSTALLED-ONLY-P argument to ~doom-get-packages~ to filter packages that aren't installed. + New function: ~doom-set-buffer-real BUFFER FLAG~ -- makes Doom consider
BUFFER real, no matter what.
+ Add INSTALLED-ONLY-P argument to ~doom-get-packages~ to filter packages that
aren't installed.
+ =core-ui= + =core-ui=
+ Add quit confirmation when trying to close a frame that contains real buffers. + Add quit confirmation when trying to close a frame that contains real
+ Fix quit confirmations for clients connected to ~emacs --daemon~ with ~emacsclient~. buffers.
+ Brought back [[https://github.com/hlissner/emacs-nlinum-hl][nlinum-hl]], which offers some line number fixes for web-mode and markdown-mode. + Fix quit confirmations for clients connected to ~emacs --daemon~ with
+ Don't report the buffer modified when injecting (or deleting) trailing whitespace in ~doom|inject-trailing-whitespace~ and ~doom|init-highlight-indentation~. ~emacsclient~.
+ Brought back [[https://github.com/hlissner/emacs-nlinum-hl][nlinum-hl]], which offers some line number fixes for web-mode
and markdown-mode.
+ Don't report the buffer modified when injecting (or deleting) trailing
whitespace in ~doom|inject-trailing-whitespace~ and
~doom|init-highlight-indentation~.
+ [[https://github.com/domtronn/all-the-icons.el][all-the-icons]] now fails gracefully in the terminal. + [[https://github.com/domtronn/all-the-icons.el][all-the-icons]] now fails gracefully in the terminal.
+ New hook: ~doom-init-ui-hook~, run whenever the UI needs to be reloaded (and once at startup). Theme and font loading is also attached to this hook. + New hook: ~doom-init-ui-hook~, run whenever the UI needs to be reloaded
+ New variables for font and theme loading: ~doom-theme~, ~doom-font~, ~doom-variable-pitch-font~, and ~doom-unicode-font~. (and once at startup). Theme and font loading is also attached to this
+ New variables for customizing line numbers: ~doom-line-number-lpad~, ~doom-line-number-rpad~, and ~doom-line-number-pad-char~. These were added to facilitate custom whitespace characters in line numbers, e.g. /u2002 (a unicode character that looks like a space). Doing so fixes an issue where ~whitespace-mode~ with ~space-mark~ would replace all space characters indiscriminately, even in line numbers. hook.
+ Add hooks ~doom-pre-reload-theme-hook~ and ~doom-post-reload-theme-hook~ to ~doom/reload-theme~ command. + New variables for font and theme loading: ~doom-theme~, ~doom-font~,
~doom-variable-pitch-font~, and ~doom-unicode-font~.
+ New variables for customizing line numbers: ~doom-line-number-lpad~,
~doom-line-number-rpad~, and ~doom-line-number-pad-char~. These were added
to facilitate custom whitespace characters in line numbers, e.g. /u2002 (a
unicode character that looks like a space). Doing so fixes an issue where
~whitespace-mode~ with ~space-mark~ would replace all space characters
indiscriminately, even in line numbers.
+ Add hooks ~doom-pre-reload-theme-hook~ and ~doom-post-reload-theme-hook~
to ~doom/reload-theme~ command.
+ =core-popups= + =core-popups=
+ Fix an issue where more specific popup rules were being overriden by more general rules. + Fix an issue where more specific popup rules were being overriden by more
+ New command: ~doom/other-popup~ -- cycles between open popup windows and the original buffer that you originated from. Discussed in [[https://github.com/hlissner/.emacs.d/issues/141][#141]]. general rules.
+ New command: ~doom/other-popup~ -- cycles between open popup windows and
the original buffer that you originated from. Discussed in [[https://github.com/hlissner/.emacs.d/issues/141][#141]].
+ =core-editor= + =core-editor=
+ Change what files recentf will ignore: everything in ~doom-host-dir~ is now ignored and anything else in ~doom-local-dir~ won't be. + Change what files recentf will ignore: everything in ~doom-host-dir~ is
+ New interactive command: ~doom/scratch-buffer~ (replaces ~+doom:scratch-buffer~ in =:ui doom=). now ignored and anything else in ~doom-local-dir~ won't be.
+ New interactive command: ~doom/scratch-buffer~ (replaces
~+doom:scratch-buffer~ in =:ui doom=).
+ =core-packages= + =core-packages=
+ Generalize ~doom-package-*-p~ functions into ~(doom-package-prop NAME PROPERTY)~. + Generalize ~doom-package-*-p~ functions into ~(doom-package-prop NAME
+ Fix quelpa temporary files (in ~quelpa-build-dir~) not being removed when a quelpa package was uninstalled. PROPERTY)~.
+ New hook: ~doom-reload-hook~ (sort of). This has been around for a while, but now it is defined and documented. It runs when ~doom/reload-load-path~ is called (which gets called remotely if you run package management while an Emacs session is active). + Fix quelpa temporary files (in ~quelpa-build-dir~) not being removed when
a quelpa package was uninstalled.
+ New hook: ~doom-reload-hook~ (sort of). This has been around for a while,
but now it is defined and documented. It runs when ~doom/reload-load-path~
is called (which gets called remotely if you run package management while
an Emacs session is active).
+ ~load!~ can now accept a string as its first argument (the path). + ~load!~ can now accept a string as its first argument (the path).
+ =feature= + =feature=
+ =feature/evil= + =feature/evil=
+ Remove =goto-last-change=, which conflicts with =goto-chg=, which is a dependency of evil (that does the exact same thing, but is what evil uses). + Remove =goto-last-change=, which conflicts with =goto-chg=, which is a
dependency of evil (that does the exact same thing, but is what evil
uses).
+ =feature/jump= + =feature/jump=
+ Remove ~:xref-backend~ setting (replaced with ~:jump~). + Remove ~:xref-backend~ setting (replaced with ~:jump~).
+ Add ~:jump MAJOR-MODE &rest PLIST~ setting, which recognizes four properties (that accept functions/commands): + Add ~:jump MAJOR-MODE &rest PLIST~ setting, which recognizes four
properties (that accept functions/commands):
+ ~:definition~: jumps to the definition of the symbol under point. + ~:definition~: jumps to the definition of the symbol under point.
+ ~:references~: lists all references of the symbol at point and lets you jump to them. + ~:references~: lists all references of the symbol at point and lets you
jump to them.
+ ~:documentation~: shows documentation for the symbol at point. + ~:documentation~: shows documentation for the symbol at point.
+ ~:xref-backend~: a function that serves as an xref backend; this replaces ~:definition~ and ~:references~. + ~:xref-backend~: a function that serves as an xref backend; this
replaces ~:definition~ and ~:references~.
+ =feature/workspaces= + =feature/workspaces=
+ New function: ~+workspace-contains-buffer-p &optional BUFFER PERSP~ -- return non-nil if BUFFER (defaults to current buffer) is in PERSP (defaults to current perspective). + New function: ~+workspace-contains-buffer-p &optional BUFFER PERSP~ --
return non-nil if BUFFER (defaults to current buffer) is in PERSP
(defaults to current perspective).
+ Fix ~+workspace-p~ not detecting a perspective struct. + Fix ~+workspace-p~ not detecting a perspective struct.
+ Fix ~+workspace-buffer-list~ not preserving buffer order (by recency). + Fix ~+workspace-buffer-list~ not preserving buffer order (by recency).
+ =completion= + =completion=
+ =completion/company= + =completion/company=
+ Add ~company-dabbrev~ and ~company-ispell~ to the default Company backends. This ensures you have some completion available in buffers previously without any. This is especially useful for text-mode buffers. Discussed in [[https://github.com/hlissner/.emacs.d/issues/134][#134]]. + Add ~company-dabbrev~ and ~company-ispell~ to the default Company
backends. This ensures you have some completion available in buffers
previously without any. This is especially useful for text-mode buffers.
Discussed in [[https://github.com/hlissner/.emacs.d/issues/134][#134]].
+ =ui= + =ui=
+ =ui/doom= + =ui/doom=
+ Vastly improve daemon and terminal support for doom-themes by reloading the theme when a new client is attached, or new terminal/daemon frame is created. This prevents incorrect colors from bleeding across face class barriers. + Vastly improve daemon and terminal support for doom-themes by reloading
+ Removed evil command ~+doom:scratch-buffer~ (replaced with ~doom/scratch-buffer~ in =core-ui=). the theme when a new client is attached, or new terminal/daemon frame is
+ Decoupled font and theme loading from this module. This has now been delegated to =core-ui=. These variables no longer exist: ~+doom-theme~, ~+doom-font~, ~+doom-variable-pitch-font~, ~+doom-unicode-font~. Discussed in [[https://github.com/hlissner/.emacs.d/issues/117][#117]]. created. This prevents incorrect colors from bleeding across face class
barriers.
+ Removed evil command ~+doom:scratch-buffer~ (replaced with
~doom/scratch-buffer~ in =core-ui=).
+ Decoupled font and theme loading from this module. This has now been
delegated to =core-ui=. These variables no longer exist: ~+doom-theme~,
~+doom-font~, ~+doom-variable-pitch-font~, ~+doom-unicode-font~. Discussed
in [[https://github.com/hlissner/.emacs.d/issues/117][#117]].
+ =ui/doom-dashboard= + =ui/doom-dashboard=
+ Fix dashboard not opening in emacsclient/daemon frames. + Fix dashboard not opening in emacsclient/daemon frames.
+ Add =gg= and =G= keybinds in dashboard for moving to the first and last button (respectively). + Add =gg= and =G= keybinds in dashboard for moving to the first and last
button (respectively).
+ =ui/doom-modeline= + =ui/doom-modeline=
+ Reorganize order of modeline segments, placing the vc branch last. This minimizes the non-uniform spacing caused by all-the-icon icons. + Reorganize order of modeline segments, placing the vc branch last. This
+ Fix blank mode-line caused by a nil buffer-file-name (used in vcs segment). For example, in org indirect buffers. minimizes the non-uniform spacing caused by all-the-icon icons.
+ Fix blank mode-line caused by a nil buffer-file-name (used in vcs
segment). For example, in org indirect buffers.
+ =tools= + =tools=
+ =tools/neotree= + =tools/neotree=
+ Fix neotree refusing to open when it was already open in another frame. This is especially frustrating when neotree is open in a (likely buried) terminal emacsclient session, and you're trying to open neotree in another. + Fix neotree refusing to open when it was already open in another frame.
This is especially frustrating when neotree is open in a (likely buried)
terminal emacsclient session, and you're trying to open neotree in
another.
+ =lang= + =lang=
+ =lang/cc= + =lang/cc=
+ Add code completion to glsl-mode (powered by [[https://github.com/Kaali/company-glsl][company-glsl]]). + Add code completion to glsl-mode (powered by [[https://github.com/Kaali/company-glsl][company-glsl]]).
+ =lang/markdown= + =lang/markdown=
+ Source blocks are now fontified natively, with the fontification of their native major-modes (see ~markdown-fontify-code-blocks-natively~). + Source blocks are now fontified natively, with the fontification of their
native major-modes (see ~markdown-fontify-code-blocks-natively~).
+ =lang/sh= + =lang/sh=
+ Fix fontification of command substitutions in double-quoted strings to help distinguish them from the rest of string literals. + Fix fontification of command substitutions in double-quoted strings to
help distinguish them from the rest of string literals.
+ =lang/web= + =lang/web=
+ Fix HTML entity encoding/decoding functions. + Fix HTML entity encoding/decoding functions.
+ =org= + =org=
+ =org/org= + =org/org=
+ Fix M-RET in plain lists not preserving indent level for new items. + Fix M-RET in plain lists not preserving indent level for new items.
+ Fix cursor jumping away when toggling folds or realigning org tables (pressing TAB). + Fix cursor jumping away when toggling folds or realigning org tables
+ Minimized keybindings into the bare necessities; most custom bindings have been moved to my private module. (pressing TAB).
+ Minimized keybindings into the bare necessities; most custom bindings have
been moved to my private module.
+ =org/org-capture= + =org/org-capture=
+ Start org-capture-mode in insert-mode (if evil is loaded). + Start org-capture-mode in insert-mode (if evil is loaded).
* 2.0.3 (Jun 11, 2017) * 2.0.3 (Jun 11, 2017)
+ *New modules* + *New modules*
+ =ui/unicode= -- fixes unicode font-rendering for a variety of languages, using [[https://github.com/rolandwalker/unicode-fonts][unicode-fonts]]. + =ui/unicode= -- fixes unicode font-rendering for a variety of languages,
+ =ui/evil-goggles= -- visual feedback for edit operations in evil-mode, using [[https://github.com/edkolev/evil-goggles][evil-goggles]]. using [[https://github.com/rolandwalker/unicode-fonts][unicode-fonts]].
+ =ui/nav-flash= (extracted from =ui/doom=) -- flashes current line when moving cursor considerable distrances, using [[https://github.com/rolandwalker/nav-flash][nav-flash]]. + =ui/evil-goggles= -- visual feedback for edit operations in evil-mode, using
+ =tools/neotree= (extracted from =feature/evil=) -- a file explorer sidebar, using [[https://github.com/jaypei/emacs-neotree/][neotree]]. [[https://github.com/edkolev/evil-goggles][evil-goggles]].
+ =ui/nav-flash= (extracted from =ui/doom=) -- flashes current line when
moving cursor considerable distrances, using [[https://github.com/rolandwalker/nav-flash][nav-flash]].
+ =tools/neotree= (extracted from =feature/evil=) -- a file explorer sidebar,
using [[https://github.com/jaypei/emacs-neotree/][neotree]].
+ =core= + =core=
+ New special file: =private/<user-login-name>/init.el= is now loaded before modules (after core). + New special file: =private/<user-login-name>/init.el= is now loaded before
modules (after core).
+ =:private <user-login-name>= is now automatically loaded by ~doom!~. + =:private <user-login-name>= is now automatically loaded by ~doom!~.
+ New help command: ~doom/describe-module~ -- for DOOM modules. + New help command: ~doom/describe-module~ -- for DOOM modules.
+ New help command: ~doom/describe-setting~ -- for possible ~set!~ targets. + New help command: ~doom/describe-setting~ -- for possible ~set!~ targets.
+ Add =make doctor= to diagnose common issues with your setup & environment. + Add =make doctor= to diagnose common issues with your setup & environment.
+ Removed ~def-bootstrap~ & ~doom-bootstrap~. It was a clumsy system. I'll replace it with README.org files in each module, with working, tangle-able source blocks. + Removed ~def-bootstrap~ & ~doom-bootstrap~. It was a clumsy system. I'll
replace it with README.org files in each module, with working, tangle-able
source blocks.
+ =core-os= + =core-os=
+ Don't use GTK tooltips on Linux (ugly!). + Don't use GTK tooltips on Linux (ugly!).
+ =core-ui= + =core-ui=
+ New plugin: [[https://github.com/syl20bnr/vi-tilde-fringe][vi-tilde-fringe]] -- subtle, vim-ish empty-line indicator. + New plugin: [[https://github.com/syl20bnr/vi-tilde-fringe][vi-tilde-fringe]] -- subtle, vim-ish empty-line indicator.
+ New variable: ~doom-ui-mode-names~ (alist) -- for changing ~mode-name~ of major-modes. + New variable: ~doom-ui-mode-names~ (alist) -- for changing ~mode-name~ of
+ Fix left-over hl-line overlays when hl-line-mode is uncleanly killed (e.g. when the major-mode is changed). major-modes.
+ Fix left-over hl-line overlays when hl-line-mode is uncleanly killed (e.g.
when the major-mode is changed).
+ Fix disappearing line numbers in nlinum (thanks to [[https://github.com/gilbertw1][gilbertw1]]). + Fix disappearing line numbers in nlinum (thanks to [[https://github.com/gilbertw1][gilbertw1]]).
+ Move theme/font bootstrap to core-ui. + Move theme/font bootstrap to core-ui.
+ New hook: ~doom-init-ui-hook~ + New hook: ~doom-init-ui-hook~
+ New global minor-mode ~doom-big-font-mode~ and variable ~doom-big-font~. + New global minor-mode ~doom-big-font-mode~ and variable ~doom-big-font~.
+ =core-keybinds= + =core-keybinds=
+ New property for ~map!~: ~:textobj~ -- for binding to evil text objects keymaps. + New property for ~map!~: ~:textobj~ -- for binding to evil text objects
keymaps.
+ Fix ~:after~ & ~:map*~ properties in ~map!~ macro (wasn't working at all). + Fix ~:after~ & ~:map*~ properties in ~map!~ macro (wasn't working at all).
+ Change keybinding scheme; the leader key is now =SPC= and localleader =SPC m=, inspired by spacemacs. + Change keybinding scheme; the leader key is now =SPC= and localleader =SPC
m=, inspired by spacemacs.
+ Enable which-key pops up for all keys. + Enable which-key pops up for all keys.
+ =core-popups= + =core-popups=
+ Properly persist ~popup~ window parameter between sessions. + Properly persist ~popup~ window parameter between sessions.
+ Improve magit+shackle integration; ensures that links will be followed within the popup they were opened. + Improve magit+shackle integration; ensures that links will be followed
+ Add ~doom-popup-no-fringe~ option (default = t). When non-nil, fringes will be disabled in popup windows (in ~doom-popup-mode~). within the popup they were opened.
+ Add ~doom-popup-no-fringe~ option (default = t). When non-nil, fringes
will be disabled in popup windows (in ~doom-popup-mode~).
+ =core-packages= + =core-packages=
+ Fix failure to detect out-of-date QUELPA packages. + Fix failure to detect out-of-date QUELPA packages.
+ Fix ~custom-file~ (and custom settings) not being loaded. + Fix ~custom-file~ (and custom settings) not being loaded.
+ Fix crash in ~doom-update-package~ caused by unreachable, new dependencies. + Fix crash in ~doom-update-package~ caused by unreachable, new
dependencies.
+ Make ~doom-update-package~ atomic in case of failure. + Make ~doom-update-package~ atomic in case of failure.
+ Make ~doom-refresh-packages~ async. + Make ~doom-refresh-packages~ async.
+ Improve the security of package management (via ELPA) by a) forcing Emacs to verify TLS connections and b) use HTTPS sources for MELPA and ELPA. + Improve the security of package management (via ELPA) by a) forcing Emacs
+ Make ~doom-get-outdated-packages~ asynchronous, producing a substantial speed-up when updating packages from Quelpa sources. to verify TLS connections and b) use HTTPS sources for MELPA and ELPA.
+ Make ~doom-get-outdated-packages~ asynchronous, producing a substantial
speed-up when updating packages from Quelpa sources.
+ =feature= + =feature=
+ =feature/evil= + =feature/evil=
+ Add ~+evil:mc~ command [[https://github.com/gabesoft/evil-mc][evil-mc]]. + Add ~+evil:mc~ command [[https://github.com/gabesoft/evil-mc][evil-mc]].
+ Add ~+evil/mc-make-cursor-here~, with visual-block support for [[https://github.com/gabesoft/evil-mc][evil-mc]]. + Add ~+evil/mc-make-cursor-here~, with visual-block support for [[https://github.com/gabesoft/evil-mc][evil-mc]].
+ =d= (operator) now invokes ~wgrep-mark-deletion~ in wgrep buffers. + =d= (operator) now invokes ~wgrep-mark-deletion~ in wgrep buffers.
+ New code folding system that combines hideshow (built-in; for indent/marker-based folds) and [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]] (for arbitrary folds). + New code folding system that combines hideshow (built-in; for
indent/marker-based folds) and [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]] (for arbitrary folds).
+ Fix [[https://github.com/redguardtoo/evil-matchit][evil-matchit]] in visual mode. + Fix [[https://github.com/redguardtoo/evil-matchit][evil-matchit]] in visual mode.
+ Fix [[https://github.com/hlissner/evil-multiedit][evil-multiedit]] M-d bindings. + Fix [[https://github.com/hlissner/evil-multiedit][evil-multiedit]] M-d bindings.
+ Fix stringp error caused by unintialized state in hideshow. + Fix stringp error caused by unintialized state in hideshow.
+ Fix evil normal-mode keybindings in help-mode popups. + Fix evil normal-mode keybindings in help-mode popups.
+ Change how ~+evil-esc-hook~ hooks are handled: they now short-circuit on the first hook to return non-nil. + Change how ~+evil-esc-hook~ hooks are handled: they now short-circuit on
the first hook to return non-nil.
+ Remove ~+evil/matchit~ (thin wrapper around ~evilmi-jump-items~). + Remove ~+evil/matchit~ (thin wrapper around ~evilmi-jump-items~).
+ Remove [[https://github.com/jaypei/emacs-neotree/][neotree]] plugin (moved to =tools/neotree=). + Remove [[https://github.com/jaypei/emacs-neotree/][neotree]] plugin (moved to =tools/neotree=).
+ =feature/jump= + =feature/jump=
@ -322,18 +484,27 @@
+ =feature/workspaces= + =feature/workspaces=
+ No longer saves session on quit if session was blank. + No longer saves session on quit if session was blank.
+ Fix persp-mode switching to main workspace if auto-resume is on. + Fix persp-mode switching to main workspace if auto-resume is on.
+ Fix ~+workspace-get~ returning a non-nil "null perspective" on some occasions where NAME doesn't exist. This is because ~persp-get-by-name~ returns the value of ~persp-not-persp~ to signify null instead of actual nil. + Fix ~+workspace-get~ returning a non-nil "null perspective" on some
+ Decouple workspace buffer-list functions from doom buffer library. Now, the workspaces module will explicitly advise ~doom-buffer-list~. occasions where NAME doesn't exist. This is because ~persp-get-by-name~
+ ~+workspace-list~ now returns a list of perspective structs, rather than a list of strings. ~+workspace-list-names~ was introduced for the latter. returns the value of ~persp-not-persp~ to signify null instead of actual
nil.
+ Decouple workspace buffer-list functions from doom buffer library. Now,
the workspaces module will explicitly advise ~doom-buffer-list~.
+ ~+workspace-list~ now returns a list of perspective structs, rather than a
list of strings. ~+workspace-list-names~ was introduced for the latter.
+ =completion= + =completion=
+ =completion/company= + =completion/company=
+ Change ~:company-backends~ to accept a variadic list of backends to prepend to ~company-backends~. Its signature is now ~(set! :company-backends MODES &rest BACKENDS)~ ([[https://github.com/hlissner/.emacs.d/pull/125][#125]]). + Change ~:company-backends~ to accept a variadic list of backends to
prepend to ~company-backends~. Its signature is now ~(set!
:company-backends MODES &rest BACKENDS)~ ([[https://github.com/hlissner/.emacs.d/pull/125][#125]]).
+ =completion/ivy= + =completion/ivy=
+ Flexible column width for ~+ivy/tasks~. + Flexible column width for ~+ivy/tasks~.
+ =ui= + =ui=
+ =ui/doom= + =ui/doom=
+ New plugin: [[https://github.com/hlissner/emacs-solaire-mode][solaire-mode]] -- replaces ~doom-buffer-mode~; brightens source windows and dims transient, temporary, or popup windows. + New plugin: [[https://github.com/hlissner/emacs-solaire-mode][solaire-mode]] -- replaces ~doom-buffer-mode~; brightens source
+ BREAKING CHANGE: Decoupled theme and font loading from ui/doom. This has been moved to core-ui. The following variables have been renamed: windows and dims transient, temporary, or popup windows.
+ BREAKING CHANGE: Decoupled theme and font loading from ui/doom. This has
been moved to core-ui. The following variables have been renamed:
+ ~+doom-theme~ => ~doom-theme~ + ~+doom-theme~ => ~doom-theme~
+ ~+doom-font~ => ~doom-font~ + ~+doom-font~ => ~doom-font~
+ ~+doom-variable-pitch-font~ => ~doom-variable-pitch-font~ + ~+doom-variable-pitch-font~ => ~doom-variable-pitch-font~
@ -344,22 +515,26 @@
+ The vcs segment now uses a slightly darker color (in clean branches). + The vcs segment now uses a slightly darker color (in clean branches).
+ Fix blank mode-line when buffer-file-name is nil ([[https://github.com/hlissner/.emacs.d/pull/130][#130]]) + Fix blank mode-line when buffer-file-name is nil ([[https://github.com/hlissner/.emacs.d/pull/130][#130]])
+ =ui/nav-flash= + =ui/nav-flash=
+ Fix over-aggressive nav-flash'ing on evil-multiedit or in eshell/term buffers. + Fix over-aggressive nav-flash'ing on evil-multiedit or in eshell/term
buffers.
+ =tools= + =tools=
+ =tools/gist= + =tools/gist=
+ Changed new gists to be private by default. + Changed new gists to be private by default.
+ =lang= + =lang=
+ =lang/haskell= + =lang/haskell=
+ New plugin: [[https://github.com/iquiw/company-ghc][company-ghc]] -- code-completion support for haskell (requires ~ghc-mod~). + New plugin: [[https://github.com/iquiw/company-ghc][company-ghc]] -- code-completion support for haskell (requires
~ghc-mod~).
+ =lang/php= + =lang/php=
+ New plugin: [[https://github.com/xcwen/ac-php][company-php]] -- code-completion support for php (requires a TAGs file created with [[https://github.com/xcwen/phpctags][phpctags]]). + New plugin: [[https://github.com/xcwen/ac-php][company-php]] -- code-completion support for php (requires a
TAGs file created with [[https://github.com/xcwen/phpctags][phpctags]]).
+ =lang/emacs-lisp= + =lang/emacs-lisp=
+ Omit defuns inside macros from the imenu index. + Omit defuns inside macros from the imenu index.
+ Don't enable ~flycheck-mode~ in emacs.d files. + Don't enable ~flycheck-mode~ in emacs.d files.
+ =lang/org= + =lang/org=
+ Replace org-bullets source with more up-to-date fork. + Replace org-bullets source with more up-to-date fork.
+ =lang/scala= + =lang/scala=
+ Fix ~void-variable imenu-auto-rescan~ error caused by ~ensime--setup-imenu~ trying to use imenu variables before loading imenu. + Fix ~void-variable imenu-auto-rescan~ error caused by
~ensime--setup-imenu~ trying to use imenu variables before loading imenu.
+ =private/hlissner= + =private/hlissner=
+ Add =gzz= binding (~+evil/mc-make-cursor-here~) + Add =gzz= binding (~+evil/mc-make-cursor-here~)
+ Add =:mc= ex command (~+evil:mc~) + Add =:mc= ex command (~+evil:mc~)
@ -370,15 +545,26 @@
* 2.0.2 (May 13, 2017) * 2.0.2 (May 13, 2017)
+ *New modules* + *New modules*
+ =tools/gist= -- allows you to manage and create gists, using [[https://github.com/defunkt/gist.el][gist.el]]. + =tools/gist= -- allows you to manage and create gists, using [[https://github.com/defunkt/gist.el][gist.el]].
+ =tools/term= -- quickly spawn a terminal (in a popup or buffer) using [[https://github.com/emacsorphanage/multi-term][multi-term]] + =tools/term= -- quickly spawn a terminal (in a popup or buffer) using
[[https://github.com/emacsorphanage/multi-term][multi-term]]
+ =app/twitter= -- Emacs as a twitter client, using [[https://github.com/hayamiz/twittering-mode][twittering-mode]] + =app/twitter= -- Emacs as a twitter client, using [[https://github.com/hayamiz/twittering-mode][twittering-mode]]
+ =core= + =core=
+ Stop "buffer is read-only" messages while in minibuffer, when I accidentally try to edit the prompt. It's correct behavior, but it consumes the minibuffers, hiding what I'm typing. + Stop "buffer is read-only" messages while in minibuffer, when I accidentally
+ Fix Emacs daemon compatibility with DOOM, which assumed a frame will always be visible on startup, causing errors when Emacs is launched as a daemon. try to edit the prompt. It's correct behavior, but it consumes the
+ Code-style change: use sharp-quote for functions. This makes the byte-compiler output missing-function warnings when they can't be found, which is helpful. minibuffers, hiding what I'm typing.
+ Stop projectile & git-gutter checks when in a TRAMP buffer; it causes tremendous slowdowns, to the point of being unusable. + Fix Emacs daemon compatibility with DOOM, which assumed a frame will always
+ Add ~message!~ & ~format!~ macros for printing colored output either a) in a popup buffer when in an interactive session or b) with ansi codes when in an noninteractive session. be visible on startup, causing errors when Emacs is launched as a daemon.
+ Changed ~doom/recompile~ to aggresively recompile =core/core.el= to fix load-path inconsistencies when you've byte-compiled your config and run a package management command. + Code-style change: use sharp-quote for functions. This makes the
byte-compiler output missing-function warnings when they can't be found,
which is helpful.
+ Stop projectile & git-gutter checks when in a TRAMP buffer; it causes
tremendous slowdowns, to the point of being unusable.
+ Add ~message!~ & ~format!~ macros for printing colored output either a) in a
popup buffer when in an interactive session or b) with ansi codes when in an
noninteractive session.
+ Changed ~doom/recompile~ to aggresively recompile =core/core.el= to fix
load-path inconsistencies when you've byte-compiled your config and run a
package management command.
+ =core-lib= + =core-lib=
+ Add ~:append~ support to ~add-transient-hook!~ macro. + Add ~:append~ support to ~add-transient-hook!~ macro.
+ =core-popups= + =core-popups=
@ -394,33 +580,45 @@
+ Fix lack of syntax highlighting in scratch buffer + Fix lack of syntax highlighting in scratch buffer
+ Use comment face as default color for ~+doom-folded-face~ + Use comment face as default color for ~+doom-folded-face~
+ =ui/doom-modeline= + =ui/doom-modeline=
+ Fix modeline disappearing due to loss of state. ~doom--modeline-format~ was being killed when switching major modes. + Fix modeline disappearing due to loss of state. ~doom--modeline-format~
was being killed when switching major modes.
+ =feature= + =feature=
+ =feature/eval= + =feature/eval=
+ Fix ~:repl~ & ~+eval/repl-send-region~. + Fix ~:repl~ & ~+eval/repl-send-region~.
+ Fix ~+eval/region~ failing only on first invocation because ~+eval-runners~ wasn't populated until quickrun is loaded. + Fix ~+eval/region~ failing only on first invocation because
~+eval-runners~ wasn't populated until quickrun is loaded.
+ Add TAB auto-completion in comint-mode and REPL buffers + Add TAB auto-completion in comint-mode and REPL buffers
+ =feature/evil= + =feature/evil=
+ Fix ~:mv~ & ~:rm~. + Fix ~:mv~ & ~:rm~.
+ Fix Neotree forgetting that it's a neotree window when switching perspectives. + Fix Neotree forgetting that it's a neotree window when switching
+ New plugin: [[https://github.com/gabesoft/evil-mc][evil-mc]] -- multiple cursors for evil-mode (thanks to [[https://github.com/gilbertw1][gilbertw1]]) perspectives.
+ Achieve vim parity w/ file modifiers (~+evil*ex-replace-special-filenames~) + New plugin: [[https://github.com/gabesoft/evil-mc][evil-mc]] -- multiple cursors for evil-mode (thanks to
[[https://github.com/gilbertw1][gilbertw1]])
+ Achieve vim parity w/ file modifiers
(~+evil*ex-replace-special-filenames~)
+ =feature/version-control= + =feature/version-control=
+ New plugin: [[https://github.com/pidu/git-timemachine][git-timemachine]] -- stepping through a file's git history. + New plugin: [[https://github.com/pidu/git-timemachine][git-timemachine]] -- stepping through a file's git history.
+ New plugin: [[https://github.com/sshaw/git-link][git-link]] -- generates and opens links to "this file"'s remote repo with your default browser. + New plugin: [[https://github.com/sshaw/git-link][git-link]] -- generates and opens links to "this file"'s remote
repo with your default browser.
+ Add ~:gbrowse~: find this file on github/gitlab/bitbucket in your browser. + Add ~:gbrowse~: find this file on github/gitlab/bitbucket in your browser.
+ Add ~:gissues~: open this project's issues page in your browser. + Add ~:gissues~: open this project's issues page in your browser.
+ Fix ~+vcs/git-browse~ and ~+vcs/git-browse-issues~. + Fix ~+vcs/git-browse~ and ~+vcs/git-browse-issues~.
+ =feature/workspaces= + =feature/workspaces=
+ Add BANG modifier to ~:cleanup~ to span all workspaces. + Add BANG modifier to ~:cleanup~ to span all workspaces.
+ Since persp-mode handles its "nil" perspective differently from others, pretend that it doesn't exist and spawn a new "main" perspective. + Since persp-mode handles its "nil" perspective differently from others,
pretend that it doesn't exist and spawn a new "main" perspective.
+ =completion= + =completion=
+ =completion/ivy= + =completion/ivy=
+ Add ~+ivy-do-action!~ factory macro. Use it for in-ivy keybindings. + Add ~+ivy-do-action!~ factory macro. Use it for in-ivy keybindings.
+ Add ripgrep file search support. Ripgrep doesn't support multiline searches, but is faster. Use =ag= for multiline (or more PCRE-compliant) searches. + Add ripgrep file search support. Ripgrep doesn't support multiline
+ Reverse ivy's built-in behavior of reversing escaping of parentheses when using the_silver_searcher or ripgrep. If you want literal parentheses, escape them explicitly. searches, but is faster. Use =ag= for multiline (or more PCRE-compliant)
searches.
+ Reverse ivy's built-in behavior of reversing escaping of parentheses when
using the_silver_searcher or ripgrep. If you want literal parentheses,
escape them explicitly.
+ Removed ~def-counsel-action!~ + Removed ~def-counsel-action!~
+ When a selection is used for ~:ag~, the selected text is now regexp-escaped. + When a selection is used for ~:ag~, the selected text is now
regexp-escaped.
+ =tools= + =tools=
+ =tools/tmux= + =tools/tmux=
+ Fix and refactor library (general update). + Fix and refactor library (general update).
@ -431,63 +629,90 @@
+ Improve electric indent support for ~js2-mode~ and ~rjsx-mode~ + Improve electric indent support for ~js2-mode~ and ~rjsx-mode~
+ =lang/org= + =lang/org=
+ Fix org-checkbox-statistics not respecting underlying faces + Fix org-checkbox-statistics not respecting underlying faces
+ Disable ~show-paren-mode~ in org-mode due to conflicts with org-indent which cause indentation flickering. + Disable ~show-paren-mode~ in org-mode due to conflicts with org-indent
+ Bind ~M-z~ (~undo~), ~C-u~ (~delete-line~) and ~C-w~ (~delete-word~) in ~org-store-link~ and ~org-insert-link~ prompts. which cause indentation flickering.
+ Apply org-headline-done face to checked-checkbox lines, to match how DONE headlines look. Also applies this to items whose subitems are all complete. + Bind ~M-z~ (~undo~), ~C-u~ (~delete-line~) and ~C-w~ (~delete-word~) in
+ Changed default fold behavior when loading an org-file to unfold first level folds. ~org-store-link~ and ~org-insert-link~ prompts.
+ Add =bin/org-capture= shell script for invoking the org-capture frame from outside Emacs. + Apply org-headline-done face to checked-checkbox lines, to match how DONE
+ Add babel support for: rust, restclient, sql, google translate, haskell and go. headlines look. Also applies this to items whose subitems are all
+ Add ~+org-pretty-mode~ for toggling "pretty" fontification. Prettified entities or hidden regions can make editing difficult. complete.
+ Changed default fold behavior when loading an org-file to unfold first
level folds.
+ Add =bin/org-capture= shell script for invoking the org-capture frame from
outside Emacs.
+ Add babel support for: rust, restclient, sql, google translate, haskell
and go.
+ Add ~+org-pretty-mode~ for toggling "pretty" fontification. Prettified
entities or hidden regions can make editing difficult.
+ =lang/python= + =lang/python=
+ Add ipython detection and REPL support + Add ipython detection and REPL support
+ Simplify matchit key (%) in python. The default is to prioritize if-else and other blocks over brackets. I found this frustrating. + Simplify matchit key (%) in python. The default is to prioritize if-else
and other blocks over brackets. I found this frustrating.
+ =lang/web= + =lang/web=
+ Fix ~+web-encode-entities~, ~+web-decode-entities~, ~+web/encode-entities-region~ and ~+web/decode-entities-region~. + Fix ~+web-encode-entities~, ~+web-decode-entities~,
~+web/encode-entities-region~ and ~+web/decode-entities-region~.
+ =app= + =app=
+ =app/email= + =app/email=
+ Replace mbsync with offlineimap. + Replace mbsync with offlineimap.
+ Add support for marking multiple emails when in visual-mode (evil) in a ~mu4e-headers-mode~ buffer. + Add support for marking multiple emails when in visual-mode (evil) in a
~mu4e-headers-mode~ buffer.
+ Fix trash mark causing duplicates upstream. + Fix trash mark causing duplicates upstream.
+ Make refiling more compatible with archiving in gmail. + Make refiling more compatible with archiving in gmail.
+ =private/hlissner= + =private/hlissner=
+ Add keybinds for [[https://github.com/gabesoft/evil-mc][evil-mc]]: based around ~gz~ (like ~gzz~ to toggle cursor freeze, and ~gzc~ to create a cursor "here"). + Add keybinds for [[https://github.com/gabesoft/evil-mc][evil-mc]]: based around ~gz~ (like ~gzz~ to toggle cursor
freeze, and ~gzc~ to create a cursor "here").
+ Add keybinds for [[https://github.com/hlissner/evil-multiedit][evil-multiedit]]: based around ~M-d~ and ~M-D~. + Add keybinds for [[https://github.com/hlissner/evil-multiedit][evil-multiedit]]: based around ~M-d~ and ~M-D~.
+ Replace ~:find~ with ~:ag~, ~:agc[wd]~, ~:rg~ and ~:rgc[wd]~. + Replace ~:find~ with ~:ag~, ~:agc[wd]~, ~:rg~ and ~:rgc[wd]~.
+ Fix ~:x~ ex command (open scratch buffer) + Fix ~:x~ ex command (open scratch buffer)
* 2.0.1 (Apr 8, 2017) * 2.0.1 (Apr 8, 2017)
+ *New modules* + *New modules*
+ =feature/jump= -- extra code navigation tools, a jump-to-definition implementation that just works ([[https://github.com/jacktasia/dumb-jump][dumb-jump]]), and tools for looking things up online. + =feature/jump= -- extra code navigation tools, a jump-to-definition
implementation that just works ([[https://github.com/jacktasia/dumb-jump][dumb-jump]]), and tools for looking things up
online.
+ =app/rss= -- Emacs as an RSS reader, using [[https://github.com/skeeto/elfeed][elfeed]] + =app/rss= -- Emacs as an RSS reader, using [[https://github.com/skeeto/elfeed][elfeed]]
+ =core= + =core=
+ Fix ~doom-kill-process-buffers~ not killing process buffers. + Fix ~doom-kill-process-buffers~ not killing process buffers.
+ Fix ~hippie-expand~ in ex mode/the minibuffer. + Fix ~hippie-expand~ in ex mode/the minibuffer.
+ Remove unnecessary ~provide~'s in core autoloaded libraries. + Remove unnecessary ~provide~'s in core autoloaded libraries.
+ Fix ~doom-buffers-in-mode~ not detecting buffers in major-modes derived from the target mode. + Fix ~doom-buffers-in-mode~ not detecting buffers in major-modes derived from
the target mode.
+ Fix out-of-bounds error in ~doom/backward-delete-whitespace-to-column~. + Fix out-of-bounds error in ~doom/backward-delete-whitespace-to-column~.
+ Remove ~doom/append-semicolon~; use evil append mode instead. + Remove ~doom/append-semicolon~; use evil append mode instead.
+ Add module bootstrapping mechanism (for installing external dependencies); see ~doom-bootstrap~, ~make bootstrap~ and ~def-bootstrap!~. + Add module bootstrapping mechanism (for installing external dependencies);
see ~doom-bootstrap~, ~make bootstrap~ and ~def-bootstrap!~.
+ Use ~doom-local-dir~ for TRAMP's temp files. + Use ~doom-local-dir~ for TRAMP's temp files.
+ New variable: ~doom-real-buffer-functions~ -- for customizing how ~doom-real-buffer-p~ determines what a "real" buffer is. + New variable: ~doom-real-buffer-functions~ -- for customizing how
+ Add ~def-memoize!~ for defining memoized functions and ~doom-memoize~ for memoizing existing ones. ~doom-real-buffer-p~ determines what a "real" buffer is.
+ Add ~def-memoize!~ for defining memoized functions and ~doom-memoize~ for
memoizing existing ones.
+ =core-lib= + =core-lib=
+ Fix ~remove-hook!~ macro not expanding correctly. + Fix ~remove-hook!~ macro not expanding correctly.
+ New macro: ~add-transient-hook!~; attach a hook to a hook or function that will remove itself once it runs. + New macro: ~add-transient-hook!~; attach a hook to a hook or function that
will remove itself once it runs.
+ =core-packages= + =core-packages=
+ Add ~doom/recompile~, for re-byte-compiling DOOM. + Add ~doom/recompile~, for re-byte-compiling DOOM.
+ Add ~doom/compile-lite~ / ~make compile-lite~, which will only byte-compile DOOM's core files, which is a lighter alternative to ~doom/compile~. + Add ~doom/compile-lite~ / ~make compile-lite~, which will only
byte-compile DOOM's core files, which is a lighter alternative to
~doom/compile~.
+ Fix duplicates packages appearing in package-management retrieval library. + Fix duplicates packages appearing in package-management retrieval library.
+ =core-os= + =core-os=
+ Reducing how aggressive ~exec-path~ caching is. A =persistent-soft= /and/ byte-compilation cache is excessive. The latter is good (and flexible) enough. + Reducing how aggressive ~exec-path~ caching is. A =persistent-soft= /and/
byte-compilation cache is excessive. The latter is good (and flexible)
enough.
+ =core-popups= + =core-popups=
+ Set default ~:align~ and ~:select~ shackle properties (of =8= and =below=). + Set default ~:align~ and ~:select~ shackle properties (of =8= and =below=).
+ =core-editor= + =core-editor=
+ Advise ~delete-trailing-whitespace~ to not affect current line. If evil is loaded, then it may affect the current line if we're *not* in insert mode. + Advise ~delete-trailing-whitespace~ to not affect current line. If evil is
loaded, then it may affect the current line if we're *not* in insert mode.
+ =core-projects= + =core-projects=
+ Recognize =package.json= as a project-root file (see ~projectile-project-root-files~). + Recognize =package.json= as a project-root file (see
~projectile-project-root-files~).
+ Fix ~:files~ property in ~def-project-mode!~ not detecting project files. + Fix ~:files~ property in ~def-project-mode!~ not detecting project files.
+ =core-ui= + =core-ui=
+ Replace [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides-mode]] with [[https://github.com/antonj/Highlight-Indentation-for-Emacs/][highlight-indentation-mode]]; the former won't display indent guides on blank lines, even with my whitespace injection hook. + Replace [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides-mode]] with [[https://github.com/antonj/Highlight-Indentation-for-Emacs/][highlight-indentation-mode]]; the
former won't display indent guides on blank lines, even with my whitespace
injection hook.
+ =feature= + =feature=
+ =feature/eval= + =feature/eval=
+ Fix build tasks system; now tested and works. + Fix build tasks system; now tested and works.
@ -499,20 +724,27 @@
+ Enable ~yas-triggers-in-field~, which adds support for nested snippets. + Enable ~yas-triggers-in-field~, which adds support for nested snippets.
+ Fix snippet aliases (~%alias~). + Fix snippet aliases (~%alias~).
+ =feature/version-control= + =feature/version-control=
+ Remove ~evil-magit~ and evil-ified bindings for magit in general. Instead, just use emacs mode. If evil is needed, toggle it with =C-z=. + Remove ~evil-magit~ and evil-ified bindings for magit in general. Instead,
just use emacs mode. If evil is needed, toggle it with =C-z=.
+ =feature/workspaces= + =feature/workspaces=
+ Fix ~+workspace/kill-session~ not actually killing the session. + Fix ~+workspace/kill-session~ not actually killing the session.
+ Revert forcing persp-mode to stay quiet when it saves the session to file. It just isn't important enough. + Revert forcing persp-mode to stay quiet when it saves the session to file.
+ Create a new perspective when switching projects (integrates projectile with persp-mode). It just isn't important enough.
+ Create a new perspective when switching projects (integrates projectile
with persp-mode).
+ Create a new perspective for new frames. + Create a new perspective for new frames.
+ =ui= + =ui=
+ =ui/doom= + =ui/doom=
+ Improve ~doom-buffer-mode~ heuristics with ~doom-real-buffer-p~, so that only truly real buffers are enlightened. + Improve ~doom-buffer-mode~ heuristics with ~doom-real-buffer-p~, so that
+ Replace plugin [[https://github.com/Malabarba/beacon][beacon]] with [[https://github.com/rolandwalker/nav-flash][nav-flash]] -- the former had a habit of causing pauses and pushing my cursor. It also didn't look as nice. only truly real buffers are enlightened.
+ Replace plugin [[https://github.com/Malabarba/beacon][beacon]] with [[https://github.com/rolandwalker/nav-flash][nav-flash]] -- the former had a habit of causing
pauses and pushing my cursor. It also didn't look as nice.
+ =ui/doom-modeline= + =ui/doom-modeline=
+ Complete rewrite of the module for code readability and performance. + Complete rewrite of the module for code readability and performance.
+ =ui/doom-dashboard= + =ui/doom-dashboard=
+ Fix a ~max-specpdl-size~ error caused on MacOS, having to do with a ~kill-buffer-query-function~ hook being attached way too soon in the startup process. + Fix a ~max-specpdl-size~ error caused on MacOS, having to do with a
~kill-buffer-query-function~ hook being attached way too soon in the
startup process.
+ =lang= + =lang=
+ =lang/cc= + =lang/cc=
+ Fix empty ~buffer-file-name~ in ~magic-mode-alist~ rule for obj-c. + Fix empty ~buffer-file-name~ in ~magic-mode-alist~ rule for obj-c.
@ -524,10 +756,13 @@
+ Add code navigation support with [[https://github.com/dominikh/go-mode.el/blob/master/go-guru.el][go-guru]] (built-in to go-mode). + Add code navigation support with [[https://github.com/dominikh/go-mode.el/blob/master/go-guru.el][go-guru]] (built-in to go-mode).
+ Add REPL support with [[https://github.com/manute/gorepl-mode][gore and gorepl-mode]]. + Add REPL support with [[https://github.com/manute/gorepl-mode][gore and gorepl-mode]].
+ =lang/haskell= + =lang/haskell=
+ New plugin: [[https://github.com/jyp/dante][dante]] -- offers xref and flycheck integration, as well as code-navigation tools, like finding definitions, references, type info, etc. + New plugin: [[https://github.com/jyp/dante][dante]] -- offers xref and flycheck integration, as well as
code-navigation tools, like finding definitions, references, type info,
etc.
+ Fix errors on haskell-mode (caused by missing dependencies). + Fix errors on haskell-mode (caused by missing dependencies).
+ =lang/javascript= + =lang/javascript=
+ New plugin: [[https://github.com/skeeto/skewer-mode][skewer-mode]] -- provides live JS/CSS/HTML evaluation in a browser. + New plugin: [[https://github.com/skeeto/skewer-mode][skewer-mode]] -- provides live JS/CSS/HTML evaluation in a
browser.
+ New plugin: [[https://github.com/yasuyk/web-beautify][web-beautify]] -- js reformatting. + New plugin: [[https://github.com/yasuyk/web-beautify][web-beautify]] -- js reformatting.
+ New plugin: [[https://github.com/NicolasPetton/xref-js2][xref-js2]] -- xref integration for javascript. + New plugin: [[https://github.com/NicolasPetton/xref-js2][xref-js2]] -- xref integration for javascript.
+ New plugin: [[https://github.com/felipeochoa/rjsx-mode][rjsx-mode]] -- adds jsx support. + New plugin: [[https://github.com/felipeochoa/rjsx-mode][rjsx-mode]] -- adds jsx support.
@ -538,26 +773,37 @@
+ Force [[https://github.com/ternjs/tern][tern]] use projectile for project path detection and resolution. + Force [[https://github.com/ternjs/tern][tern]] use projectile for project path detection and resolution.
+ Add gulpfile.js detection (~+javascript-gulp-mode~). + Add gulpfile.js detection (~+javascript-gulp-mode~).
+ =lang/latex= + =lang/latex=
+ Improve integration between auctex, evil and ~reftex-toc-mode~: j/k motion keys have been bound in reftex-toc-mode, the modeline is hidden, and ~reftex-toc-rescan~ is run automatically. + Improve integration between auctex, evil and ~reftex-toc-mode~: j/k motion
keys have been bound in reftex-toc-mode, the modeline is hidden, and
~reftex-toc-rescan~ is run automatically.
+ =lang/org= + =lang/org=
+ Add =+notes= submodule, which makes it easy to access org-mode based notes for the current major-mode or the current project. See ~+org/browse-notes-for-major-mode~ and ~+org/browse-notes-for-project~. + Add =+notes= submodule, which makes it easy to access org-mode based notes
+ Ensure newer org-mode 9.0+ (downloaded from ELPA) is loaded instead of the older, built-in version of org-mode (8.3). for the current major-mode or the current project. See
+ Update ~+org/dwim-at-point~, ~+org/insert-item~ & ~+org/toggle-checkbox~ for org-mode 9.0 ~+org/browse-notes-for-major-mode~ and ~+org/browse-notes-for-project~.
+ Ensure newer org-mode 9.0+ (downloaded from ELPA) is loaded instead of the
older, built-in version of org-mode (8.3).
+ Update ~+org/dwim-at-point~, ~+org/insert-item~ & ~+org/toggle-checkbox~
for org-mode 9.0
+ Fix shackle popup integration with org-export dispatch window. + Fix shackle popup integration with org-export dispatch window.
+ =lang/ruby= + =lang/ruby=
+ Add ={Pod,Puppet,Berks}file= detection for ~ruby-mode~. + Add ={Pod,Puppet,Berks}file= detection for ~ruby-mode~.
+ =lang/web= + =lang/web=
+ New plugin: [[https://github.com/yasuyk/web-beautify][web-beautify]] -- html/css reformatting + New plugin: [[https://github.com/yasuyk/web-beautify][web-beautify]] -- html/css reformatting
+ Remove ~+web-bower-mode~. I don't use it anymore; I prefer npm as my sole package manager. + Remove ~+web-bower-mode~. I don't use it anymore; I prefer npm as my sole
+ Improve ~+web-angularjs-mode~ detection by searching for angular 1 and 2 dependencies in package.json. package manager.
+ Add ~+web-react-mode~ and detect it by searching for reactjs dependencies in package.json. + Improve ~+web-angularjs-mode~ detection by searching for angular 1 and 2
dependencies in package.json.
+ Add ~+web-react-mode~ and detect it by searching for reactjs dependencies
in package.json.
+ =app= + =app=
+ =app/rss= + =app/rss=
+ Hide modeline in ~elfeed-search-mode~ buffer. + Hide modeline in ~elfeed-search-mode~ buffer.
+ =app/present= + =app/present=
+ New plugin: [[https://github.com/yjwen/org-reveal/][ox-reveal]] -- export a presentation to html, js & css from org-mode using [[http://lab.hakim.se/reveal-js/][reveal.js]]. + New plugin: [[https://github.com/yjwen/org-reveal/][ox-reveal]] -- export a presentation to html, js & css from
org-mode using [[http://lab.hakim.se/reveal-js/][reveal.js]].
+ New plugin: [[https://github.com/takaxp/org-tree-slide][org-tree-slides]] -- use ~org-mode~ directly for presentations. + New plugin: [[https://github.com/takaxp/org-tree-slide][org-tree-slides]] -- use ~org-mode~ directly for presentations.
+ Add ~+present/big-mode~; which will toggle large fonts, controlled by ~+present-big-font~. + Add ~+present/big-mode~; which will toggle large fonts, controlled by
~+present-big-font~.
+ New plugin: [[https://github.com/skeeto/impatient-mode][impatient-mode]] -- show off current buffer(s) over HTTP. + New plugin: [[https://github.com/skeeto/impatient-mode][impatient-mode]] -- show off current buffer(s) over HTTP.
+ =app/email= + =app/email=
+ Add support for writing emails in org-mode, which renders to HTML on send. + Add support for writing emails in org-mode, which renders to HTML on send.
@ -568,22 +814,31 @@
* 2.0.0 (Jan 17, 2017) * 2.0.0 (Jan 17, 2017)
+ *New modules* + *New modules*
+ =tools/upload= -- map local files to remotes, allowing you to upload/download files between them. + =tools/upload= -- map local files to remotes, allowing you to
+ =feature/jump= -- offers a system for navigating codebases that "just works", powered by xref (new experimental Emacs reference API) & [[https://github.com/jacktasia/dumb-jump][dumb-jump]]. upload/download files between them.
+ =feature/workspaces= -- offers grouped buffers/windows and persistent sessions. Recently replaced [[https://github.com/pashinin/workgroups2][workgroups2]] with the much-faster [[https://github.com/Bad-ptr/persp-mode.el][persp-mode]]. + =feature/jump= -- offers a system for navigating codebases that "just
works", powered by xref (new experimental Emacs reference API) & [[https://github.com/jacktasia/dumb-jump][dumb-jump]].
+ =feature/workspaces= -- offers grouped buffers/windows and persistent
sessions. Recently replaced [[https://github.com/pashinin/workgroups2][workgroups2]] with the much-faster [[https://github.com/Bad-ptr/persp-mode.el][persp-mode]].
+ =core= + =core=
+ Add .travis.yml and unit-tests. + Add .travis.yml and unit-tests.
+ Remove mplist library -- it was unused and poorly written. + Remove mplist library -- it was unused and poorly written.
+ =core-popups= + =core-popups=
+ Replaced popwin with shackle; which is significantly lighter and more stable. + Replaced popwin with shackle; which is significantly lighter and more
stable.
+ =feature/spellcheck= + =feature/spellcheck=
+ Add selection popup for correcting spelling mistakes highlighted by flyspell. + Add selection popup for correcting spelling mistakes highlighted by
flyspell.
+ =completion/ivy= + =completion/ivy=
+ Add ~+ivy:todo~ for jumping to TODO/FIXME tags in your project. + Add ~+ivy:todo~ for jumping to TODO/FIXME tags in your project.
+ =lang/org= + =lang/org=
+ Make TAB do-what-I-mean (~+org/dwim-at-point~), which will either: follow a link, realign/recalculate tables, toggle checkboxes, toggle TODO/DONE tags, cycle archived subtrees, toggle latex preview fragments, execute babel blocks, or refresh inline images -- depending on where the cursor is. + Make TAB do-what-I-mean (~+org/dwim-at-point~), which will either: follow a
link, realign/recalculate tables, toggle checkboxes, toggle TODO/DONE tags,
cycle archived subtrees, toggle latex preview fragments, execute babel
blocks, or refresh inline images -- depending on where the cursor is.
+ =lang/web= + =lang/web=
+ Add ~+css/toggle-inline-or-block~ command; it will expand/contract curly-braced blocks. + Add ~+css/toggle-inline-or-block~ command; it will expand/contract
curly-braced blocks.
+ =private/hlissner= + =private/hlissner=
+ Add ~:todo~ ex command (~+ivy:todo~) + Add ~:todo~ ex command (~+ivy:todo~)

View file

@ -1,13 +1,13 @@
# Ensure emacs always runs from this makefile's PWD # Ensure emacs always runs from this makefile's PWD
EMACS_FLAGS=--eval '(setq user-emacs-directory default-directory)' -l core/core.el EMACS_FLAGS=--eval '(setq user-emacs-directory default-directory)' -l core/core.el
EMACS=emacs --batch $(EMACS_FLAGS) EMACS=emacs --quick --batch $(EMACS_FLAGS)
EMACSI=emacs -q $(EMACS_FLAGS) EMACSI=emacs -q $(EMACS_FLAGS)
MODULES=$(patsubst modules/%, %, $(shell find modules/ -maxdepth 2 -type d)) MODULES=$(patsubst modules/%, %, $(shell find modules/ -maxdepth 2 -type d))
all: autoloads autoremove install all: autoloads autoremove install
## Aliases ## Shortcuts
a: autoloads a: autoloads
i: install i: install
u: update u: update
@ -18,16 +18,16 @@ ce: compile-elpa
## Package management ## Package management
install: init.el .local/autoloads.el install: init.el .local/autoloads.el
@$(EMACS) -f doom/packages-install @$(EMACS) -f doom//packages-install
update: init.el .local/autoloads.el update: init.el .local/autoloads.el
@$(EMACS) -f doom/packages-update @$(EMACS) -f doom//packages-update
autoremove: init.el .local/autoloads.el autoremove: init.el .local/autoloads.el
@$(EMACS) -f doom/packages-autoremove @$(EMACS) -f doom//packages-autoremove
autoloads: init.el autoloads: init.el
@$(EMACS) -f doom/reload-autoloads @$(EMACS) -f doom//reload-autoloads
## Byte compilation ## Byte compilation
@ -36,29 +36,22 @@ autoloads: init.el
# compile-module # compile-module
# compile-module/submodule # compile-module/submodule
compile: init.el clean compile: init.el clean
@$(EMACS) -f doom/compile @$(EMACS) -f doom//byte-compile
compile-core: init.el clean compile-core: init.el clean
@$(EMACS) -f doom/compile -- init.el core @$(EMACS) -f doom//byte-compile-core
compile-elpa: init.el compile-elpa: init.el
@$(EMACS) -f doom/recompile-packages @$(EMACS) -f doom//byte-recompile-plugins
$(patsubst %, compile-%, $(MODULES)): init.el .local/autoloads.el $(patsubst %, compile-%, $(MODULES)): init.el .local/autoloads.el
@rm -fv $(shell find $(patsubst compile-%, modules/%, $@) -type f -name '*.elc') @$(EMACS) -f doom//byte-compile -- $(patsubst compile-%, %, $@)
@$(EMACS) -f doom/compile -- $(patsubst compile-%, modules/%, $@)
recompile: init.el recompile: init.el
@$(EMACS) -f doom/recompile @$(EMACS) -f doom//byte-compile -- -r
clean: clean:
@$(EMACS) -f doom/clean-compiled-files @$(EMACS) -f doom//clean-byte-compiled-files
clean-pcache:
@$(EMACS) -l persistent-soft --eval '(delete-directory pcache-directory t)'
reset:
@$(EMACS) -f doom/reset
## Unit tests ## Unit tests
@ -67,14 +60,14 @@ reset:
# test-module # test-module
# test-module/submodule # test-module/submodule
test: init.el .local/autoloads.el test: init.el .local/autoloads.el
@$(EMACS) -f doom-run-tests @$(EMACS) -f doom//run-tests
test-core $(patsubst %, test-%, $(MODULES)): init.el .local/autoloads.el test-core $(patsubst %, test-%, $(MODULES)): init.el .local/autoloads.el
@$(EMACS) -f doom-run-tests -- $(subst test-, , $@) @$(EMACS) -f doom//run-tests -- $(subst test-, , $@)
# run tests interactively # run tests interactively
testi: init.el .local/autoloads.el testi: init.el .local/autoloads.el
@$(EMACSI) -f doom-run-tests -f ert @$(EMACSI) -f doom//run-tests -f ert
## Utility tasks ## Utility tasks
@ -84,7 +77,7 @@ run:
# Diagnoses potential OS/environment issues # Diagnoses potential OS/environment issues
doctor: doctor:
@./bin/doom-doctor @bin/doom-doctor
## Internal tasks ## Internal tasks
init.el: init.el:
@ -93,7 +86,4 @@ init.el:
.local/autoloads.el: .local/autoloads.el:
@$(EMACS) -f doom-initialize-autoloads @$(EMACS) -f doom-initialize-autoloads
%.elc: %.el .PHONY: all compile test testi clean
@$(EMACS) -f doom/compile -- $<
.PHONY: all compile test testi

View file

@ -23,16 +23,13 @@
It is a story as old as time. A stubborn, shell-dwelling, and melodramatic It is a story as old as time. A stubborn, shell-dwelling, and melodramatic
vimmer -- envious of the features of modern text editors -- spirals into despair vimmer -- envious of the features of modern text editors -- spirals into despair
before he finally succumbs to the [dark side][evil-mode]. This is his config. before finally succumbing to the [dark side][evil-mode]. This is his config.
DOOM's philosophy is simple: be **fast**, be **readable**, and be **pretty**. It Doom strives to be fast, fabulous and hacker friendly. It is tailored for
is tailored for neckbeards with a blue-belt or better in command-line-fu who neckbeards with blue belts or better in command-line-fu, Elisp and git.
don't shy away from dabbling with Elisp.
Rip and tear. Until it compiles. > Doom **only** supports Emacs >= 25.1, and is tested on Arch Linux 4.7+ and
> MacOS 10.11. YMMV on other platforms.
> **Important:** Doom only supports Emacs >= 25.1, and is tailored for Arch
> Linux 4.7+ and Mac OS 10.11+.
- - - - - -
@ -45,6 +42,8 @@ cp init.example.el init.el # maybe edit init.el
make install make install
``` ```
Don't forget to run `make` every time you modify init.el!
Visit the wiki for [a more detailed guide on installing, customizing and Visit the wiki for [a more detailed guide on installing, customizing and
grokking Doom][wiki]. grokking Doom][wiki].
@ -53,22 +52,24 @@ grokking Doom][wiki].
+ A fast, organized and opinionated Emacs configuration with a command line + A fast, organized and opinionated Emacs configuration with a command line
interface. interface.
+ A custom, declarative [package management system][doom-packages] that combines + A custom, declarative [package management system][doom-packages] that combines
package.el, [use-package] and [quelpa]. This lets you install packages from package.el, [use-package] and [quelpa], allowing you to manage packages from
sources other than ELPA, as well as manage packages from the command line. the command line and install packages from sources other than ELPA.
+ A [popup management system][doom-popups] (powered by [shackle]) that minimizes + A [popup management system][doom-popups] (powered by [shackle]) that minimizes
the presence and footprint of temporary and/or disposable buffers. the presence and footprint of temporary and/or disposable buffers.
+ A vim-like experience with [evil-mode], including ports for several vim + A vim-like experience with [evil-mode], including ports for several vim
plugins, <kbd>C-x</kbd> omnicompletion and a slew of [custom ex commands][doom-my-commands]. plugins, <kbd>C-x</kbd> omnicompletion and a slew of [custom ex
+ Integration with [editorconfig]. Let someone else argue about tabs and spaces commands][doom-my-commands].
+ Integration with [editorconfig]. Let someone else argue about tabs and spaces.
(spaces, duh). (spaces, duh).
+ Code completion for a variety of languages, powered by [company-mode] (there + Code completion for many languages, powered by [company-mode] (some languages
may be other dependencies for certain languages). may have external dependencies).
+ Project-awareness powered by [projectile], with tools to navigate and manage + Project-awareness powered by [projectile], with tools and an API to navigate
projects and project files. and manage projects and their files.
+ Fast project search (and replace) utilities, powered by [the_silver_searcher], + Fast project search (and replace) utilities, powered by [the_silver_searcher],
[ripgrep] and [wgrep], with [ivy] (the default), [helm] and ido integration. [ripgrep] and [wgrep], with integration for [ivy] (the default), [helm] and
+ Isolated and persistent workspaces powered by [persp-mode]. This can ido.
substitute for vim tabs. + Isolated and persistent workspaces powered by [persp-mode]. Also substitutes
for vim tabs.
+ Inline/live code evaluation (using [quickrun]), including REPLs for a variety + Inline/live code evaluation (using [quickrun]), including REPLs for a variety
of languages. of languages.
@ -76,34 +77,32 @@ grokking Doom][wiki].
Found a problem? Here are some things to try: Found a problem? Here are some things to try:
+ Make sure all plugins are installed with `make install`. + Run `make install` to ensure all plugins are installed.
+ A `void-function` or `void-variable` might signal an out-of-date autoloads + `void-function` or `void-variable` errors could signal an out-of-date
file. Update it with `make autoloads`. autoloads file. Run `make autoloads` or `M-x doom//reload-autoloads` to update
+ Diagnose common OS/environment issues that could interfere with Emacs with it.
`make doctor`. + Scan for common OS/environment issues with `make doctor`.
+ If you byte-compiled Doom, run `make clean` or `M-x doom/clean-compiled-files` + **Never debug byte-compiled code. It will interfere in subtle ways.** Clean up
and restart Emacs. Never debug byte-compiled code, it will interfere with your \*.elc files with `make clean` or `M-x doom//clean-byte-compiled-files`.
efforts in subtle (and not-so-subtle) ways.
+ Check [the FAQ][wiki-troubleshooting] to see if your issue is mentioned. + Check [the FAQ][wiki-troubleshooting] to see if your issue is mentioned.
+ If your issue is associated with a particular module, like code-completion, + Check the relevant module's README.org, if one exists. There may be extra
check the module's README.org, if any. steps to getting certain features to work.
If all else fails, [file a bug report][doom-new-issue]. If all else has failed, [file a bug report][doom-new-issue].
## Contribute ## Contribute
Doom (and my Emacs work in general) is a labor of love and incurable madness, Doom (and my Emacs work in general) is a labor of love and incurable madness,
done on my free time. It wasn't intended for public use, but I enjoy making Doom done on my spare time. It wasn't intended for public use, but I enjoy making
a resource for others. Doom a resource for others.
If you'd like to support my efforts, I welcome contributions of any kind: If you'd like to support my efforts, I welcome contributions of any kind:
+ I love pull requests and bug reports, and elisp pointers are especially + I love pull requests and bug reports. Elisp pointers are especially welcome.
welcome. Seriously, don't hesitate to [tell me my Elisp-fu Seriously, don't hesitate to [tell me my Elisp-fu sucks][doom-new-issue]!
sucks][doom-new-issue]! + Talk to me about Emacs workflow, ideas or tooling. Or talk to me about
+ I'm happy to discuss Emacs workflow, ideas or tooling. If you think I, Doom or gamedev, or pixel art, or anime, or programming, or the weather, or band camp.
other Emacs users could benefit from them (or you just want to chat), drop me Whatever. I don't mind. Holler at henrik@lissner.net.
a line at henrik@lissner.net. I'm eager to learn.
[wiki]: /../../wiki [wiki]: /../../wiki

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } # -*-emacs-lisp-*- ":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } # -*-emacs-lisp-*-
":"; [[ $(emacs --version | head -n1) == *\ 2[0-2].[0-1].[0-9] ]] && { echo "You're running $(emacs --version | head -n1)"; echo "That version is too old to run the doctor. Check your PATH"; echo; exit 2; } || exec emacs --no-site-file --batch -l "$0" ":"; [[ $(emacs --version | head -n1) == *\ 2[0-2].[0-1].[0-9] ]] && { echo "You're running $(emacs --version | head -n1)"; echo "That version is too old to run the doctor. Check your PATH"; echo; exit 2; } || exec emacs --quick --script "$0"
;; Uses a couple simple heuristics to locate issues with your environment that ;; Uses a couple simple heuristics to locate issues with your environment that
;; could interfere with running or setting up DOOM Emacs. ;; could interfere with running or setting up DOOM Emacs.
@ -145,17 +145,6 @@
(warn! "Warning: unable to detect font") (warn! "Warning: unable to detect font")
(explain! "The `find-font' function is missing. This could indicate the incorrect " (explain! "The `find-font' function is missing. This could indicate the incorrect "
"version of Emacs is being used!")) "version of Emacs is being used!"))
(defun -find-font (family)
(when (fontp family)
(setq family (symbol-name (font-get doom-font :family))))
(let ((inhibit-message t))
(shell-command (format "fc-list | grep %s" (shell-quote-argument family)))))
(when (boundp 'doom-font)
(if (-find-font doom-font)
(success! "Found font %s" (font-get doom-font :family))
(warn! "Warning: couldn't find %s font (default) (%s)"
(font-get doom-font :family))))
;; all-the-icons fonts ;; all-the-icons fonts
(let ((font-dest (pcase system-type (let ((font-dest (pcase system-type
('gnu/linux (concat (or (getenv "XDG_DATA_HOME") ('gnu/linux (concat (or (getenv "XDG_DATA_HOME")
@ -294,7 +283,7 @@
(indented 4 (indented 4
(columns 3 23 (columns 3 23
(mapcar (lambda (x) (format "+%s" x)) (mapcar (lambda (x) (format "+%s" x))
(mapcar #'cdr (doom--module-pairs))))))) (mapcar #'cdr (doom-module-pairs)))))))
(when (and (bound-and-true-p doom-packages) (when (and (bound-and-true-p doom-packages)
(require 'package nil t)) (require 'package nil t))

View file

@ -1,5 +1,6 @@
#!/bin/sh #!/usr/bin/env bash
":"; exec emacs --no-site-file --script "$0" -- "$@" # -*-emacs-lisp-*- ":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-
;;; bin/org-tangle
;; Extracts source blocks from org files and prints them to stdout. Debug/info ;; Extracts source blocks from org files and prints them to stdout. Debug/info
;; messages are directed to stderr and can be ignored. -l/--lang can be used to ;; messages are directed to stderr and can be ignored. -l/--lang can be used to
@ -10,7 +11,7 @@
;; org-tangle modules/ui/doom/README.org > install_fira_mono.sh ;; org-tangle modules/ui/doom/README.org > install_fira_mono.sh
;; org-tangle -l sh modules/lang/go/README.org | sh ;; org-tangle -l sh modules/lang/go/README.org | sh
(load "~/.emacs.d/core/core.el" nil t) (load (expand-file-name "../core/core.el" (file-name-directory load-file-name)) nil t)
(require 'org-install) (require 'org-install)
(require 'org) (require 'org)
@ -24,9 +25,20 @@
(apply orig-fn args))) (apply orig-fn args)))
(advice-add #'org-babel-tangle :around #'*org-babel-tangle) (advice-add #'org-babel-tangle :around #'*org-babel-tangle)
(let ((lang (when (member (car command-line-args-left) '("--lang" "-l")) (let (lang srcs)
(pop command-line-args-left) (pop argv)
(pop command-line-args-left))) (while argv
(srcs (cl-remove-if-not 'file-exists-p command-line-args-left))) (let ((arg (pop argv)))
(pcase arg
((or "--lang" "-l")
(setq lang (pop argv)))
((guard (string-match-p "^--lang=" arg))
(setq lang (cadr (split-string arg "=" t t))))
((guard (file-exists-p arg))
(push arg srcs))
(_
(error "Unknown option or file: %s" arg)))))
(dolist (file srcs) (dolist (file srcs)
(org-babel-tangle-file file nil lang))) (org-babel-tangle-file file nil lang))
(kill-emacs 0))

View file

@ -25,7 +25,7 @@ submodule in the format, e.g. ':feature evil')."
nil t))) nil t)))
(cl-destructuring-bind (category submodule) (cl-destructuring-bind (category submodule)
(mapcar #'intern (split-string module " ")) (mapcar #'intern (split-string module " "))
(unless (member (cons category submodule) (doom--module-pairs)) (unless (member (cons category submodule) (doom-module-pairs))
(error "'%s' isn't a valid module" module)) (error "'%s' isn't a valid module" module))
(let ((doc-path (expand-file-name "README.org" (doom-module-path category submodule)))) (let ((doc-path (expand-file-name "README.org" (doom-module-path category submodule))))
(unless (file-exists-p doc-path) (unless (file-exists-p doc-path)

View file

@ -9,7 +9,7 @@
(when force-p (when force-p
(doom-refresh-clear-cache)) (doom-refresh-clear-cache))
(unless (or (persistent-soft-fetch 'last-pkg-refresh "emacs") (unless (or (persistent-soft-fetch 'last-pkg-refresh "emacs")
doom--refresh-p) doom--refreshed-p)
(condition-case-unless-debug ex (condition-case-unless-debug ex
(progn (progn
(message "Refreshing package archives") (message "Refreshing package archives")
@ -23,25 +23,22 @@
;;;###autoload ;;;###autoload
(defun doom-refresh-clear-cache () (defun doom-refresh-clear-cache ()
"Clear the cache for `doom-refresh-packages'." "Clear the cache for `doom-refresh-packages'."
(setq doom--refresh-p nil) (setq doom--refreshed-p nil)
(persistent-soft-store 'last-pkg-refresh nil "emacs")) (persistent-soft-store 'last-pkg-refresh nil "emacs"))
;;;###autoload ;;;###autoload
(defun doom-package-backend (name) (defun doom-package-backend (name &optional noerror)
"Get which backend the package NAME was installed with. Can either be elpa, "Get which backend the package NAME was installed with. Can either be elpa or
quelpa or nil (if not installed)." quelpa. Throws an error if NOERROR is nil and the package isn't installed."
(cl-assert (symbolp name) t) (cl-assert (symbolp name) t)
(doom-initialize-packages) (doom-initialize)
(cond ((let ((plist (cdr (assq name doom-packages)))) (cond ((and (or (quelpa-setup-p)
(and (not (plist-get plist :pin)) (error "Could not initialize quelpa"))
(or (quelpa-setup-p) (assq name quelpa-cache))
(error "Could not initialize quelpa"))
(or (assq name quelpa-cache)
(plist-get plist :recipe))))
'quelpa) 'quelpa)
((assq name package-alist) ((assq name package-alist)
'elpa) 'elpa)
(t ((not noerror)
(error "%s package not installed" name)))) (error "%s package not installed" name))))
;;;###autoload ;;;###autoload
@ -79,6 +76,18 @@ list of the package."
(doom-initialize-packages) (doom-initialize-packages)
(plist-get (cdr (assq name doom-packages)) prop)) (plist-get (cdr (assq name doom-packages)) prop))
;;;###autoload
(defun doom-package-different-backend-p (name)
"Return t if NAME (a package's symbol) has a new backend than what it was
installed with. Returns nil otherwise, or if package isn't installed."
(cl-assert (symbolp name) t)
(doom-initialize-packages)
(and (package-installed-p name)
(let* ((plist (cdr (assq name doom-packages)))
(old-backend (doom-package-backend name t))
(new-backend (if (plist-get plist :recipe) 'quelpa 'elpa)))
(not (eq old-backend new-backend)))))
;;;###autoload ;;;###autoload
(defun doom-get-packages (&optional installed-only-p) (defun doom-get-packages (&optional installed-only-p)
"Retrieves a list of explicitly installed packages (i.e. non-dependencies). "Retrieves a list of explicitly installed packages (i.e. non-dependencies).
@ -129,38 +138,26 @@ Used by `doom/packages-update'."
(let ((sym (car pkg))) (let ((sym (car pkg)))
(when (and (or (not (doom-package-prop sym :freeze)) (when (and (or (not (doom-package-prop sym :freeze))
include-frozen-p) include-frozen-p)
(not (doom-package-prop sym :ignore))) (not (doom-package-prop sym :ignore))
(not (doom-package-different-backend-p sym)))
(push sym (push sym
(if (eq (doom-package-backend sym) 'quelpa) (if (eq (doom-package-backend sym) 'quelpa)
quelpa-pkgs quelpa-pkgs
elpa-pkgs))))) elpa-pkgs)))))
;; The bottleneck in this process is quelpa's version checks, so partition ;; The bottleneck in this process is quelpa's version checks, so check them
;; and check them asynchronously. ;; asynchronously.
(let* ((max-threads 3) ; TODO Do real CPU core/thread count (let (futures)
(min-per-part 2) (dolist (pkg quelpa-pkgs)
(per-part (max min-per-part (ceiling (/ (length quelpa-pkgs) (float max-threads))))) (debug! "New thread for: %s" pkg)
(leftover (mod (length quelpa-pkgs) per-part))
parts
futures)
(while quelpa-pkgs
(let (part)
(dotimes (_i (+ per-part leftover))
(when-let (p (pop quelpa-pkgs))
(push p part)))
(setq leftover 0)
(push (nreverse part) parts)))
(dolist (part (reverse parts))
(debug! "New thread for: %s" part)
(push (async-start (push (async-start
`(lambda () `(lambda ()
(setq user-emacs-directory ,user-emacs-directory) (setq user-emacs-directory ,user-emacs-directory)
(let ((noninteractive t)) (let ((noninteractive t))
(load ,(expand-file-name "core.el" doom-core-dir))) (load ,(expand-file-name "core.el" doom-core-dir)))
(delq nil (mapcar #'doom-package-outdated-p ',part)))) (doom-package-outdated-p ',pkg)))
futures)) futures))
(apply #'append (append (delq nil (mapcar #'doom-package-outdated-p elpa-pkgs))
(delq nil (mapcar #'doom-package-outdated-p elpa-pkgs)) (delq nil (mapcar #'async-get (reverse futures)))))))
(mapcar #'async-get futures)))))
;;;###autoload ;;;###autoload
(defun doom-get-orphaned-packages () (defun doom-get-orphaned-packages ()
@ -171,7 +168,10 @@ Used by `doom/packages-autoremove'."
(doom-initialize-packages t) (doom-initialize-packages t)
(let ((package-selected-packages (let ((package-selected-packages
(append (mapcar #'car doom-packages) doom-core-packages))) (append (mapcar #'car doom-packages) doom-core-packages)))
(package--removable-packages))) (append (package--removable-packages)
(cl-loop for pkg in package-selected-packages
if (doom-package-different-backend-p pkg)
collect pkg))))
;;;###autoload ;;;###autoload
(defun doom-get-missing-packages (&optional include-ignored-p) (defun doom-get-missing-packages (&optional include-ignored-p)
@ -184,14 +184,15 @@ If INCLUDE-IGNORED-P is non-nil, includes missing packages that are ignored,
i.e. they have an :ignore property. i.e. they have an :ignore property.
Used by `doom/packages-install'." Used by `doom/packages-install'."
(cl-loop for pkgsym in (doom-get-packages) (cl-loop for desc in (doom-get-packages)
unless for (name . plist) = desc
(let ((pkg (car pkgsym))) if (and (or include-ignored-p
(or (assq pkg package-alist) (not (plist-get plist :ignore)))
(unless include-ignored-p (doom-package-prop pkg :ignore)) (or (plist-get plist :pin)
(and (not (plist-get (assq pkg doom-packages) :pin)) (not (assq name package--builtins)))
(assq pkg package--builtins)))) (or (not (assq name package-alist))
collect pkgsym)) (doom-package-different-backend-p name)))
collect desc))
;;;###autoload ;;;###autoload
(defun doom*package-delete (desc &rest _) (defun doom*package-delete (desc &rest _)
@ -251,6 +252,8 @@ Used by `doom/packages-install'."
example; the package name can be omitted)." example; the package name can be omitted)."
(doom-initialize-packages) (doom-initialize-packages)
(when (package-installed-p name) (when (package-installed-p name)
(when (doom-package-different-backend-p name)
(doom-delete-package name t))
(user-error "%s is already installed" name)) (user-error "%s is already installed" name))
(let ((plist (or plist (cdr (assq name doom-packages)))) (let ((plist (or plist (cdr (assq name doom-packages))))
(inhibit-message (not doom-debug-mode)) (inhibit-message (not doom-debug-mode))
@ -316,7 +319,7 @@ package.el as appropriate."
;; ;;
;;;###autoload ;;;###autoload
(defun doom/packages-install () (defun doom//packages-install ()
"Interactive command for installing missing packages." "Interactive command for installing missing packages."
(interactive) (interactive)
(let ((packages (doom-get-missing-packages))) (let ((packages (doom-get-missing-packages)))
@ -327,14 +330,20 @@ package.el as appropriate."
(y-or-n-p (y-or-n-p
(format "%s packages will be installed:\n\n%s\n\nProceed?" (format "%s packages will be installed:\n\n%s\n\nProceed?"
(length packages) (length packages)
(mapconcat (lambda (pkg) (mapconcat
(format "+ %s (%s)" (lambda (pkg)
(car pkg) (format "+ %s (%s)"
(if (plist-get (cdr pkg) :recipe) (car pkg)
"QUELPA" (cond ((doom-package-different-backend-p (car pkg))
"ELPA"))) (if (plist-get (cdr pkg) :recipe)
(sort (cl-copy-list packages) #'doom--sort-alpha) "ELPA -> QUELPA"
"\n"))))) "QUELPA -> ELPA"))
((plist-get (cdr pkg) :recipe)
"QUELPA")
(t
"ELPA"))))
(sort (cl-copy-list packages) #'doom--sort-alpha)
"\n")))))
(message! (yellow "Aborted!"))) (message! (yellow "Aborted!")))
(t (t
@ -354,10 +363,10 @@ package.el as appropriate."
""))))) "")))))
(message! (bold (green "Finished!"))) (message! (bold (green "Finished!")))
(doom/reload-load-path)))) (doom//reload-load-path))))
;;;###autoload ;;;###autoload
(defun doom/packages-update () (defun doom//packages-update ()
"Interactive command for updating packages." "Interactive command for updating packages."
(interactive) (interactive)
(doom-refresh-packages doom-debug-mode) (doom-refresh-packages doom-debug-mode)
@ -395,10 +404,10 @@ package.el as appropriate."
(if result "DONE" "FAILED")))))) (if result "DONE" "FAILED"))))))
(message! (bold (green "Finished!"))) (message! (bold (green "Finished!")))
(doom/reload-load-path))))) (doom//reload-load-path)))))
;;;###autoload ;;;###autoload
(defun doom/packages-autoremove () (defun doom//packages-autoremove ()
"Interactive command for auto-removing orphaned packages." "Interactive command for auto-removing orphaned packages."
(interactive) (interactive)
(let ((packages (doom-get-orphaned-packages))) (let ((packages (doom-get-orphaned-packages)))
@ -409,12 +418,21 @@ package.el as appropriate."
(y-or-n-p (y-or-n-p
(format "%s packages will be deleted:\n\n%s\n\nProceed?" (format "%s packages will be deleted:\n\n%s\n\nProceed?"
(length packages) (length packages)
(mapconcat (lambda (sym) (format "+ %s (%s)" sym (mapconcat
(pcase (doom-package-backend sym) (lambda (sym)
('quelpa "QUELPA") (format
('elpa "ELPA")))) "+ %s (%s)"
(sort (cl-copy-list packages) #'string-lessp) sym
"\n"))))) (let ((backend (doom-package-backend sym)))
(if (doom-package-different-backend-p sym)
(if (eq backend 'quelpa)
"QUELPA->ELPA"
"ELPA->QUELPA")
(if (eq backend 'quelpa)
"QUELPA"
"ELPA")))))
(sort (cl-copy-list packages) #'string-lessp)
"\n")))))
(message! (yellow "Aborted!"))) (message! (yellow "Aborted!")))
(t (t
@ -428,7 +446,8 @@ package.el as appropriate."
pkg))))) pkg)))))
(message! (bold (green "Finished!"))) (message! (bold (green "Finished!")))
(doom/reload-load-path))))) (doom//reload-load-path)))))
;;;###autoload ;;;###autoload
(defalias 'doom/install-package #'package-install) (defalias 'doom/install-package #'package-install)

View file

@ -238,7 +238,7 @@ without leaving any trace behind (muahaha)."
(call-interactively (call-interactively
(if (featurep 'evil) (if (featurep 'evil)
#'evil-force-normal-state #'evil-force-normal-state
#'keyboard-escape-quit)) #'keyboard-quit))
(delete-window))) (delete-window)))
;;;###autoload ;;;###autoload

View file

@ -1,14 +1,13 @@
;;; core/autoload/test.el -*- lexical-binding: t; -*- ;;; core/autoload/test.el -*- lexical-binding: t; no-byte-compile: t; -*-
;;;###autoload ;;;###autoload
(defun doom-run-tests (&optional modules) (defun doom//run-tests (&optional modules)
"Run all loaded tests, specified by MODULES (a list of module cons cells) or "Run all loaded tests, specified by MODULES (a list of module cons cells) or
command line args following a double dash (each arg should be in the command line args following a double dash (each arg should be in the
'module/submodule' format). 'module/submodule' format).
If neither is available, run all tests in all enabled modules." If neither is available, run all tests in all enabled modules."
(interactive) ; must be interactive to be run from batch (interactive)
;; FIXME Refactor this
(condition-case-unless-debug ex (condition-case-unless-debug ex
(let (targets) (let (targets)
;; ensure DOOM is initialized ;; ensure DOOM is initialized
@ -16,19 +15,18 @@ If neither is available, run all tests in all enabled modules."
(load (expand-file-name "core/core.el" user-emacs-directory) nil t) (load (expand-file-name "core/core.el" user-emacs-directory) nil t)
(doom-initialize-modules nil)) (doom-initialize-modules nil))
;; collect targets ;; collect targets
(cond ((and command-line-args-left (cond ((and argv (equal (car argv) "--"))
(equal (car command-line-args-left) "--")) (cl-loop for arg in argv
(cl-loop for arg in (cdr argv)
if (equal arg "core") if (equal arg "core")
do (push (expand-file-name "test/" doom-core-dir) targets) do (push (expand-file-name "test/" doom-core-dir) targets)
else else
collect collect
(cl-destructuring-bind (car &optional cdr) (split-string arg "/" t) (cl-destructuring-bind (car &optional cdr) (split-string arg "/" t)
(cons (intern (concat ":" car)) (cons (intern (concat ":" car))
(and cdr (intern cdr)))) (and cdr (intern cdr))))
into args into args
finally do (setq modules args finally do
command-line-args-left nil))) (setq modules args argv nil)))
(modules (modules
(unless (cl-loop for module in modules (unless (cl-loop for module in modules
@ -42,7 +40,7 @@ If neither is available, run all tests in all enabled modules."
(let ((noninteractive t) (let ((noninteractive t)
doom-modules) doom-modules)
(load (expand-file-name "init.test.el" user-emacs-directory) nil t) (load (expand-file-name "init.test.el" user-emacs-directory) nil t)
(setq modules (doom--module-pairs) (setq modules (doom-module-pairs)
targets (list (expand-file-name "test/" doom-core-dir)))))) targets (list (expand-file-name "test/" doom-core-dir))))))
;; resolve targets to a list of test files and load them ;; resolve targets to a list of test files and load them
(cl-loop with targets = (cl-loop with targets =
@ -58,8 +56,8 @@ If neither is available, run all tests in all enabled modules."
collect (expand-file-name "test/" path)))) collect (expand-file-name "test/" path))))
for dir in targets for dir in targets
if (file-directory-p dir) if (file-directory-p dir)
nconc (reverse (directory-files-recursively dir "\\.el$")) nconc (reverse (directory-files-recursively dir "\\.el$"))
into items into items
finally do (quiet! (mapc #'load-file items))) finally do (quiet! (mapc #'load-file items)))
;; run all loaded tests ;; run all loaded tests
(when noninteractive (when noninteractive

View file

@ -68,17 +68,6 @@ window changes before then, the undo expires."
(delete-frame)) (delete-frame))
(save-buffers-kill-emacs))) (save-buffers-kill-emacs)))
;;;###autoload
(defun doom/reload-theme ()
"Reset the color theme currently in use."
(interactive)
(let ((theme (or (car-safe custom-enabled-themes) doom-theme)))
(when theme
(mapc #'disable-theme custom-enabled-themes))
(run-hooks 'doom-pre-reload-theme-hook)
(doom|init-ui)
(run-hooks 'doom-post-reload-theme-hook)))
;;;###autoload ;;;###autoload
(define-minor-mode doom-big-font-mode (define-minor-mode doom-big-font-mode
"A global mode that resizes the font, for streams, screen-sharing and "A global mode that resizes the font, for streams, screen-sharing and
@ -91,3 +80,14 @@ presentations."
(if doom-big-font-mode (if doom-big-font-mode
(set-frame-font doom-big-font t t) (set-frame-font doom-big-font t t)
(set-frame-font doom-font t t))) (set-frame-font doom-font t t)))
;;;###autoload
(defun doom//reload-theme ()
"Reset the color theme currently in use."
(interactive)
(let ((theme (or (car-safe custom-enabled-themes) doom-theme)))
(when theme
(mapc #'disable-theme custom-enabled-themes))
(run-hooks 'doom-pre-reload-theme-hook)
(doom|init-ui)
(run-hooks 'doom-post-reload-theme-hook)))

View file

@ -15,7 +15,7 @@ modes are active and the buffer is read-only.")
;; Save clipboard contents into kill-ring before replacing them ;; Save clipboard contents into kill-ring before replacing them
save-interprogram-paste-before-kill t save-interprogram-paste-before-kill t
;; Bookmarks ;; Bookmarks
bookmark-default-file (concat doom-cache-dir "bookmarks") bookmark-default-file (concat doom-etc-dir "bookmarks")
bookmark-save-flag t bookmark-save-flag t
;; Formatting ;; Formatting
delete-trailing-lines nil delete-trailing-lines nil
@ -61,17 +61,6 @@ modes are active and the buffer is read-only.")
(ignore (bury-buffer)))) (ignore (bury-buffer))))
(add-hook 'kill-buffer-query-functions #'doom|dont-kill-scratch-buffer) (add-hook 'kill-buffer-query-functions #'doom|dont-kill-scratch-buffer)
(defun doom*delete-trailing-whitespace (orig-fn &rest args)
"Don't affect trailing whitespace on current line."
(let ((linestr (buffer-substring-no-properties
(line-beginning-position)
(line-end-position))))
(apply orig-fn args)
(when (and (if (featurep 'evil) (evil-insert-state-p) t)
(string-match-p "^[\s\t]*$" linestr))
(insert linestr))))
(advice-add #'delete-trailing-whitespace :around #'doom*delete-trailing-whitespace)
(defun doom|check-large-file () (defun doom|check-large-file ()
"Check if the buffer's file is large (see `doom-large-file-size'). If so, ask "Check if the buffer's file is large (see `doom-large-file-size'). If so, ask
for confirmation to open it literally (read-only, disabled undo and in for confirmation to open it literally (read-only, disabled undo and in
@ -111,10 +100,8 @@ enable multiple minor modes for the same regexp.")
(if (string-match-p (caar alist) name) (if (string-match-p (caar alist) name)
(funcall (cdar alist) 1)) (funcall (cdar alist) 1))
(setq alist (cdr alist)))))) (setq alist (cdr alist))))))
(add-hook 'find-file-hook #'doom|enable-minor-mode-maybe) (add-hook 'find-file-hook #'doom|enable-minor-mode-maybe)
;; ensure indirect buffers have buffer-file-name
(defun doom*set-indirect-buffer-filename (orig-fn base-buffer name &optional clone) (defun doom*set-indirect-buffer-filename (orig-fn base-buffer name &optional clone)
"In indirect buffers, `buffer-file-name' is nil, which can cause problems "In indirect buffers, `buffer-file-name' is nil, which can cause problems
with functions that require it (like modeline segments)." with functions that require it (like modeline segments)."
@ -128,6 +115,19 @@ with functions that require it (like modeline segments)."
buffer)) buffer))
(advice-add #'make-indirect-buffer :around #'doom*set-indirect-buffer-filename) (advice-add #'make-indirect-buffer :around #'doom*set-indirect-buffer-filename)
(defun doom*delete-trailing-whitespace (orig-fn &rest args)
"Don't affect trailing whitespace on current line."
(let ((linestr (buffer-substring-no-properties
(line-beginning-position)
(line-end-position))))
(apply orig-fn args)
(when (and (if (featurep 'evil) (evil-insert-state-p) t)
(string-match-p "^[\s\t]*$" linestr))
(insert linestr))))
(advice-add #'delete-trailing-whitespace :around #'doom*delete-trailing-whitespace)
(push '("/LICENSE$" . text-mode) auto-mode-alist)
;; ;;
;; Built-in plugins ;; Built-in plugins
@ -152,7 +152,7 @@ with functions that require it (like modeline segments)."
(def-package! recentf (def-package! recentf
:init (add-hook 'doom-init-hook #'recentf-mode) :init (add-hook 'doom-init-hook #'recentf-mode)
:config :config
(setq recentf-save-file (concat doom-cache-dir "recentf") (setq recentf-save-file (concat doom-etc-dir "recentf")
recentf-max-menu-items 0 recentf-max-menu-items 0
recentf-max-saved-items 300 recentf-max-saved-items 300
recentf-exclude recentf-exclude
@ -186,6 +186,32 @@ with functions that require it (like modeline segments)."
:config :config
(add-hook 'doom-init-hook #'editorconfig-mode) (add-hook 'doom-init-hook #'editorconfig-mode)
;; editorconfig cannot procure the correct settings for extension-less files.
;; Executable scripts with a shebang line, for example. So why not use Emacs'
;; major mode to drop editorconfig a hint? This is accomplished by temporarily
;; appending an extension to `buffer-file-name' when we talk to editorconfig.
(defvar doom-editorconfig-mode-alist
'((sh-mode . "sh")
(python-mode . "py")
(ruby-mode . "rb")
(perl-mode . "pl")
(php-mode . "php"))
"An alist mapping major modes to extensions. Used by
`doom*editorconfig-smart-detection' to give editorconfig filetype hints.")
(defun doom*editorconfig-smart-detection (orig-fn &rest args)
"Retrieve the properties for the current file. If it doesn't have an
extension, try to guess one."
(let ((buffer-file-name
(if (file-name-extension buffer-file-name)
buffer-file-name
(format "%s%s" buffer-file-name
(let ((ext (cdr (assq major-mode doom-editorconfig-mode-alist))))
(or (and ext (concat "." ext))
""))))))
(apply orig-fn args)))
(advice-add #'editorconfig-call-editorconfig-exec :around #'doom*editorconfig-smart-detection)
;; Editorconfig makes indentation weird in Lisp modes, so we disable it. It ;; Editorconfig makes indentation weird in Lisp modes, so we disable it. It
;; still applies other project settings (e.g. tabs vs spaces) though. ;; still applies other project settings (e.g. tabs vs spaces) though.
(set! :editorconfig :remove 'emacs-lisp-mode) (set! :editorconfig :remove 'emacs-lisp-mode)

View file

@ -17,7 +17,8 @@
(?e . emacs) (?e . emacs)
(?o . operator) (?o . operator)
(?m . motion) (?m . motion)
(?r . replace)) (?r . replace)
(?g . global))
"A list of cons cells that map a letter to a evil state symbol.") "A list of cons cells that map a letter to a evil state symbol.")
@ -109,10 +110,8 @@
For example, :nvi will map to (list 'normal 'visual 'insert). See For example, :nvi will map to (list 'normal 'visual 'insert). See
`doom-evil-state-alist' to customize this." `doom-evil-state-alist' to customize this."
(cl-loop for l across (substring (symbol-name keyword) 1) (cl-loop for l across (substring (symbol-name keyword) 1)
if (cdr (assq l doom-evil-state-alist)) if (cdr (assq l doom-evil-state-alist)) collect it
collect it else do (error "not a valid state: %s" l)))
else
do (error "not a valid state: %s" l)))
;; Register keywords for proper indentation (see `map!') ;; Register keywords for proper indentation (see `map!')
@ -258,7 +257,7 @@ Example
(setq def (pop rest)) (setq def (pop rest))
(when desc (when desc
(push `(doom--keybind-register ,(key-description (eval key)) (push `(doom--keybind-register ,(key-description (eval key))
,desc ',modes) ,desc ',modes)
forms)) forms))
(cond ((and doom--local doom--keymaps) (cond ((and doom--local doom--keymaps)
(push `(lwarn 'doom-map :warning (push `(lwarn 'doom-map :warning
@ -267,16 +266,23 @@ Example
forms) forms)
(throw 'skip 'local)) (throw 'skip 'local))
((and doom--keymaps states) ((and doom--keymaps states)
(unless (featurep 'evil) (throw 'skip 'evil)) (unless (featurep 'evil)
(throw 'skip 'evil))
(dolist (keymap doom--keymaps) (dolist (keymap doom--keymaps)
(push `(,(if doom--defer 'evil-define-key 'evil-define-key*) (when (memq 'global states)
',states ,keymap ,key ,def) (push `(define-key ,keymap ,key ,def) forms))
forms))) (when-let (states (delq 'global states))
(push `(,(if doom--defer 'evil-define-key 'evil-define-key*)
',states ,keymap ,key ,def)
forms))))
(states (states
(unless (featurep 'evil) (throw 'skip 'evil)) (unless (featurep 'evil)
(throw 'skip 'evil))
(dolist (state states) (dolist (state states)
(push `(define-key (push `(define-key
,(intern (format "evil-%s-state-%smap" state (if doom--local "local-" ""))) ,(if (eq state 'global)
'(current-global-map)
(intern (format "evil-%s-state-%smap" state (if doom--local "local-" ""))))
,key ,def) ,key ,def)
forms))) forms)))
(doom--keymaps (doom--keymaps

View file

@ -68,7 +68,7 @@ package's name as a symbol, and whose CDR is the plist supplied to its
`package!' declaration. Set by `doom-initialize-packages'.") `package!' declaration. Set by `doom-initialize-packages'.")
(defvar doom-core-packages (defvar doom-core-packages
'(persistent-soft quelpa use-package) '(persistent-soft quelpa use-package async)
"A list of packages that must be installed (and will be auto-installed if "A list of packages that must be installed (and will be auto-installed if
missing) and shouldn't be deleted.") missing) and shouldn't be deleted.")
@ -90,7 +90,7 @@ missing) and shouldn't be deleted.")
"A backup of `load-path' before it was altered by `doom-initialize'. Used as a "A backup of `load-path' before it was altered by `doom-initialize'. Used as a
base by `doom!' and for calculating how many packages exist.") base by `doom!' and for calculating how many packages exist.")
(defvar doom--refresh-p nil) (defvar doom--refreshed-p nil)
(setq load-prefer-newer (or noninteractive doom-debug-mode) (setq load-prefer-newer (or noninteractive doom-debug-mode)
package--init-file-ensured t package--init-file-ensured t
@ -147,7 +147,11 @@ startup."
(dolist (dir (list doom-local-dir doom-etc-dir doom-cache-dir package-user-dir)) (dolist (dir (list doom-local-dir doom-etc-dir doom-cache-dir package-user-dir))
(unless (file-directory-p dir) (unless (file-directory-p dir)
(make-directory dir t))) (make-directory dir t)))
(package-initialize t) (condition-case _ (package-initialize t)
('error
(package-refresh-contents)
(setq doom--refreshed-p t)
(package-initialize t)))
;; We could let `package-initialize' fill `load-path', but it costs precious ;; We could let `package-initialize' fill `load-path', but it costs precious
;; milliseconds and does other stuff I don't need (like load autoload ;; milliseconds and does other stuff I don't need (like load autoload
;; files). My premature optimization quota isn't filled yet. ;; files). My premature optimization quota isn't filled yet.
@ -159,9 +163,9 @@ startup."
;; Ensure core packages are installed ;; Ensure core packages are installed
(dolist (pkg doom-core-packages) (dolist (pkg doom-core-packages)
(unless (package-installed-p pkg) (unless (package-installed-p pkg)
(unless doom--refresh-p (unless doom--refreshed-p
(package-refresh-contents) (package-refresh-contents)
(setq doom--refresh-p t)) (setq doom--refreshed-p t))
(let ((inhibit-message t)) (let ((inhibit-message t))
(package-install pkg)) (package-install pkg))
(if (package-installed-p pkg) (if (package-installed-p pkg)
@ -177,7 +181,7 @@ startup."
"Ensures that `doom-autoload-file' exists and is loaded. Otherwise run "Ensures that `doom-autoload-file' exists and is loaded. Otherwise run
`doom/reload-autoloads' to generate it." `doom/reload-autoloads' to generate it."
(unless (file-exists-p doom-autoload-file) (unless (file-exists-p doom-autoload-file)
(quiet! (doom/reload-autoloads)))) (quiet! (doom//reload-autoloads))))
(defun doom-initialize-packages (&optional force-p load-p) (defun doom-initialize-packages (&optional force-p load-p)
"Crawls across your emacs.d to fill `doom-modules' (from init.el) and "Crawls across your emacs.d to fill `doom-modules' (from init.el) and
@ -187,33 +191,38 @@ If FORCE-P is non-nil, do it even if they are.
This aggressively reloads core autoload files." This aggressively reloads core autoload files."
(doom-initialize force-p) (doom-initialize force-p)
(let ((noninteractive t) (with-temp-buffer ; prevent buffer-local settings from propagating
(load-prefer-newer t) (let ((noninteractive t)
(load-fn (load-prefer-newer t)
(lambda (file &optional noerror) (load-fn
(condition-case-unless-debug ex (lambda (file &optional noerror)
(load file noerror :nomessage :nosuffix) (condition-case-unless-debug ex
('error (load file noerror :nomessage :nosuffix)
(error (format "(doom-initialize-packages) %s in %s: %s" ('error
(car ex) (error (format "(doom-initialize-packages) %s in %s: %s"
(file-relative-name file doom-emacs-dir) (car ex)
(error-message-string ex)) (file-relative-name file doom-emacs-dir)
:error)))))) (error-message-string ex))
(when (or force-p (not doom-modules)) :error))))))
(setq doom-modules nil) (when (or force-p (not doom-modules))
(funcall load-fn (expand-file-name "init.el" doom-emacs-dir)) (setq doom-modules nil)
(when load-p
(let (noninteractive) (let (noninteractive)
(funcall load-fn (doom-module-path :private user-login-name "init.el") t) (load (concat doom-core-dir "core.el") nil t))
(funcall load-fn (expand-file-name "core.el" doom-core-dir))) (funcall load-fn (expand-file-name "init.el" doom-emacs-dir))
(mapc load-fn (file-expand-wildcards (expand-file-name "autoload/*.el" doom-core-dir)))) (when load-p
(doom|finalize)) (let (noninteractive)
(when (or force-p (not doom-packages)) (funcall load-fn (doom-module-path :private user-login-name "init.el") t))
(setq doom-packages nil) (mapc load-fn (file-expand-wildcards (expand-file-name "autoload/*.el" doom-core-dir)))
(funcall load-fn (expand-file-name "packages.el" doom-core-dir)) (cl-loop for (module . submodule) in (doom-module-pairs)
(cl-loop for (module . submodule) in (doom--module-pairs) for path = (doom-module-path module submodule "config.el")
for path = (doom-module-path module submodule "packages.el") do (funcall load-fn path t))))
do (funcall load-fn path t))))) (when (or force-p (not doom-packages))
(setq doom-packages nil)
(funcall load-fn (expand-file-name "packages.el" doom-core-dir))
(cl-loop for (module . submodule) in (doom-module-pairs)
for path = (doom-module-path module submodule "packages.el")
do (funcall load-fn path t)))))
(doom|finalize))
(defun doom-initialize-modules (modules) (defun doom-initialize-modules (modules)
"Adds MODULES to `doom-modules'. MODULES must be in mplist format. "Adds MODULES to `doom-modules'. MODULES must be in mplist format.
@ -246,6 +255,14 @@ This aggressively reloads core autoload files."
(cons (intern (concat ":" (match-string 1 path))) (cons (intern (concat ":" (match-string 1 path)))
(intern (match-string 2 path))))) (intern (match-string 2 path)))))
(defun doom-module-paths (&optional append-file)
"Returns a list of absolute file paths to activated modules, with APPEND-FILE
added, if the file exists."
(cl-loop for (module . submodule) in (doom-module-pairs)
for path = (doom-module-path module submodule append-file)
if (file-exists-p path)
collect path))
(defun doom-module-flags (module submodule) (defun doom-module-flags (module submodule)
"Returns a list of flags provided for MODULE SUBMODULE." "Returns a list of flags provided for MODULE SUBMODULE."
(and (hash-table-p doom-modules) (and (hash-table-p doom-modules)
@ -265,7 +282,7 @@ Used by `require!' and `depends-on!'."
(doom-enlist (or flags t)) (doom-enlist (or flags t))
doom-modules)) doom-modules))
(defun doom--module-pairs () (defun doom-module-pairs ()
"Returns `doom-modules' as a list of (MODULE . SUBMODULE) cons cells. The list "Returns `doom-modules' as a list of (MODULE . SUBMODULE) cons cells. The list
is sorted by order of insertion unless ALL-P is non-nil. If ALL-P is non-nil, is sorted by order of insertion unless ALL-P is non-nil. If ALL-P is non-nil,
include all modules, enabled or otherwise." include all modules, enabled or otherwise."
@ -274,15 +291,7 @@ include all modules, enabled or otherwise."
(cl-loop for key being the hash-keys of doom-modules (cl-loop for key being the hash-keys of doom-modules
collect key)) collect key))
(defun doom--module-paths (&optional append-file) (defun doom-packages--display-benchmark ()
"Returns a list of absolute file paths to activated modules, with APPEND-FILE
added, if the file exists."
(cl-loop for (module . submodule) in (doom--module-pairs)
for path = (doom-module-path module submodule append-file)
if (file-exists-p path)
collect path))
(defun doom--display-benchmark ()
(message "Doom loaded %s packages across %d modules in %.03fs" (message "Doom loaded %s packages across %d modules in %.03fs"
;; Certainly imprecise, especially where custom additions to ;; Certainly imprecise, especially where custom additions to
;; load-path are concerned, but I don't mind a [small] margin of ;; load-path are concerned, but I don't mind a [small] margin of
@ -311,7 +320,7 @@ MODULES is an malformed plist of modules to load."
(unless noninteractive (unless noninteractive
(load ,(doom-module-path :private user-login-name "init") t t) (load ,(doom-module-path :private user-login-name "init") t t)
,@(cl-loop for (module . submodule) in (doom--module-pairs) ,@(cl-loop for (module . submodule) in (doom-module-pairs)
collect `(require! ,module ,submodule nil t)) collect `(require! ,module ,submodule nil t))
(when (display-graphic-p) (when (display-graphic-p)
@ -319,7 +328,7 @@ MODULES is an malformed plist of modules to load."
(unless (server-running-p) (unless (server-running-p)
(server-start))) (server-start)))
(add-hook 'doom-init-hook #'doom--display-benchmark t) (add-hook 'doom-init-hook #'doom-packages--display-benchmark t)
(message "Doom modules initialized")))) (message "Doom modules initialized"))))
(defmacro def-package! (name &rest plist) (defmacro def-package! (name &rest plist)
@ -482,7 +491,24 @@ loads MODULE SUBMODULE's packages.el file."
;; Commands ;; Commands
;; ;;
(defun doom/reload-load-path () (defun doom-packages--read-if-cookies (file)
"Returns the value of the ;;;###if predicate form in FILE."
(with-temp-buffer
(insert-file-contents-literally file nil 0 256)
(if (re-search-forward "^;;;###if " nil t)
(eval (sexp-at-point))
t)))
(defun doom-packages--async-run (fn)
(let ((compilation-filter-hook
(list (lambda () (ansi-color-apply-on-region compilation-filter-start (point))))))
(compile (format "%s --quick --batch -l core/core.el -f %s"
(executable-find "emacs")
(symbol-name fn)))
(while compilation-in-progress
(sit-for 1))))
(defun doom//reload-load-path ()
"Reload `load-path' and recompile files (if necessary). "Reload `load-path' and recompile files (if necessary).
Use this when `load-path' is out of sync with your plugins. This should only Use this when `load-path' is out of sync with your plugins. This should only
@ -492,20 +518,19 @@ an Emacs session is running.
This isn't necessary if you use Doom's package management commands because they This isn't necessary if you use Doom's package management commands because they
call `doom/reload-load-path' remotely (through emacsclient)." call `doom/reload-load-path' remotely (through emacsclient)."
(interactive) (interactive)
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t)
(cond (noninteractive (cond (noninteractive
(message "Reloading...") (message "Reloading...")
(require 'server) (require 'server)
(unless (ignore-errors (server-eval-at "server" '(doom/reload-load-path))) (when (file-exists-p (if server-use-tcp server-auth-dir server-socket-dir))
(message "Recompiling") (server-eval-at "server" '(doom//reload-load-path))))
(doom/recompile)))
(t (t
(doom-initialize t) (doom-initialize t)
(doom/recompile)
(message "Reloaded %d packages" (length doom--package-load-path)) (message "Reloaded %d packages" (length doom--package-load-path))
(run-with-timer 1 nil #'redraw-display) (run-with-timer 1 nil #'redraw-display)
(run-hooks 'doom-reload-hook)))) (run-hooks 'doom-reload-hook))))
(defun doom/reload-autoloads () (defun doom//reload-autoloads ()
"Refreshes the autoloads.el file, specified by `doom-autoload-file'. "Refreshes the autoloads.el file, specified by `doom-autoload-file'.
It scans and reads core/autoload/*.el, modules/*/*/autoload.el and It scans and reads core/autoload/*.el, modules/*/*/autoload.el and
@ -518,156 +543,164 @@ This should be run whenever init.el or an autoload file is modified. Running
(interactive) (interactive)
;; This function must not use autoloaded functions or external dependencies. ;; This function must not use autoloaded functions or external dependencies.
;; It must assume nothing is set up! ;; It must assume nothing is set up!
(doom-initialize-packages (not noninteractive)) (if (not noninteractive)
(let ((evil-p (doom-module-loaded-p :feature 'evil)) ;; This is done "asynchroniously" to protect the current session's state.
(targets ;; This is because `doom-initialize-packages' rereads your emacs config,
(file-expand-wildcards ;; which has side effects.
(expand-file-name "autoload/*.el" doom-core-dir)))) (and (doom-packages--async-run 'doom//reload-autoloads)
(dolist (path (doom--module-paths)) (load doom-autoload-file))
(let ((auto-dir (expand-file-name "autoload" path)) (doom-initialize-packages)
(auto-file (expand-file-name "autoload.el" path))) (let ((targets
(when (file-exists-p auto-file) (file-expand-wildcards
(push auto-file targets)) (expand-file-name "autoload/*.el" doom-core-dir))))
(when (file-directory-p auto-dir) (dolist (path (doom-module-paths))
(dolist (file (file-expand-wildcards (expand-file-name "*.el" auto-dir) t)) (let ((auto-dir (expand-file-name "autoload" path))
;; Make evil*.el autoload files a special case; don't load (auto-file (expand-file-name "autoload.el" path)))
;; them unless evil is enabled. (when (and (file-exists-p auto-file)
(unless (and (string-prefix-p "evil" (file-name-nondirectory file)) (doom-packages--read-if-cookies auto-file))
(not evil-p)) (push auto-file targets))
(push file targets)))))) (when (file-directory-p auto-dir)
(when (file-exists-p doom-autoload-file) (dolist (file (file-expand-wildcards (expand-file-name "*.el" auto-dir) t))
(delete-file doom-autoload-file) ;; Make evil*.el autoload files a special case; don't load
(message "Deleted old autoloads.el")) ;; them unless evil is enabled.
(dolist (file (reverse targets)) (when (doom-packages--read-if-cookies file)
(message (if (update-file-autoloads file nil doom-autoload-file) (push file targets))))))
"Nothing in %s" (when (file-exists-p doom-autoload-file)
"Scanned %s") (delete-file doom-autoload-file)
(file-relative-name file doom-emacs-dir))) (message "Deleted old autoloads.el"))
(let ((buf (get-file-buffer doom-autoload-file)) (dolist (file (reverse targets))
current-sexp) (message (if (update-file-autoloads file nil doom-autoload-file)
(unwind-protect "Nothing in %s"
(condition-case-unless-debug ex "Scanned %s")
(with-current-buffer buf (file-relative-name file doom-emacs-dir)))
(save-buffer) (let ((buf (get-file-buffer doom-autoload-file))
(goto-char (point-min)) current-sexp)
(while (re-search-forward "^(" nil t) (unwind-protect
(save-excursion (condition-case-unless-debug ex
(backward-char) (with-current-buffer buf
(setq current-sexp (read (thing-at-point 'sexp t))) (save-buffer)
(eval current-sexp t)) (goto-char (point-min))
(forward-char)) (while (re-search-forward "^(" nil t)
(message "Finished generating autoloads.el!")) (save-excursion
('error (backward-char)
(delete-file doom-autoload-file) (setq current-sexp (read (thing-at-point 'sexp t)))
(error "Error in autoloads.el: (%s %s ...) %s -- %s" (eval current-sexp t))
(nth 0 current-sexp) (forward-char))
(nth 1 current-sexp) (message "Finished generating autoloads.el!"))
(car ex) (error-message-string ex)))) ('error
(kill-buffer buf))))) (delete-file doom-autoload-file)
(error "Error in autoloads.el: (%s %s ...) %s -- %s"
(nth 0 current-sexp)
(nth 1 current-sexp)
(car ex) (error-message-string ex))))
(kill-buffer buf))))))
(defun doom/compile (&optional lite-p only-recompile-p) (defun doom//byte-compile (&optional modules recompile-p)
"Byte compiles your emacs configuration. "Byte compiles your emacs configuration.
Specifically, this byte-compiles init.el, core/*.el, core/autoload/*.el & init.el is always byte-compiled by this.
modules/*/*/**.el. It ignores unit tests and files with `no-byte-compile'
enabled.
DOOM Emacs was designed to benefit from byte-compilation, but the process may If MODULES is specified (a list of module strings, e.g. \"lang/php\"), those are
take a while. Also, while your config files are byte-compiled, changes to them byte-compiled. Otherwise, all enabled modules are byte-compiled, including Doom
will not take effect! Use `doom/clean-compiled' or `make clean' to undo core. It always ignores unit tests and files with `no-byte-compile' enabled.
byte-compilation.
If LITE-P is non-nil, only compile the core DOOM files (init.el & core/**/*.el). Doom was designed to benefit from byte-compilation, but the process may take a
while. Also, while your config files are byte-compiled, changes to them will not
take effect! Use `doom//clean-byte-compiled-files' or `make clean' to remove
these files.
If ONLY-RECOMPILE-P is non-nil, only recompile out-of-date files." If RECOMPILE-P is non-nil, only recompile out-of-date files."
(interactive
(list nil current-prefix-arg))
(let ((default-directory doom-emacs-dir)
(recompile-p (or recompile-p
(and (member "-r" (cdr argv)) t))))
(if (not noninteractive)
;; This is done "asynchroniously" to protect the current session's
;; state. This is because `doom-initialize-packages' rereads your emacs
;; config, which has side effects.
(doom-packages--async-run 'doom//byte-compile)
(let ((total-ok 0)
(total-fail 0)
(total-noop 0)
(modules (or modules (cdr argv)))
compile-targets)
(doom-initialize-packages t t)
(setq compile-targets
(cl-loop for target
in (or modules (append (list doom-core-dir) (doom-module-paths)))
if (equal target "core")
nconc (nreverse (directory-files-recursively doom-core-dir "\\.el$"))
else if (file-directory-p target)
nconc (nreverse (directory-files-recursively target "\\.el$"))
else if (file-directory-p (expand-file-name target doom-modules-dir))
nconc (nreverse (directory-files-recursively (expand-file-name target doom-modules-dir) "\\.el$"))
else if (file-exists-p target)
collect target
finally do (setq argv nil)))
(unless compile-targets
(error "No targets to compile"))
(let ((use-package-expand-minimally t))
(push (expand-file-name "init.el" doom-emacs-dir) compile-targets)
(dolist (target compile-targets)
(when (or (not recompile-p)
(let ((elc-file (byte-compile-dest-file target)))
(and (file-exists-p elc-file)
(file-newer-than-file-p file elc-file))))
(let ((result (if (and (string-match-p "/autoload/.*\\.el$" target)
(not (doom-packages--read-if-cookies target)))
'no-byte-compile
(byte-compile-file target)))
(short-name (file-relative-name target doom-emacs-dir)))
(cl-incf
(cond ((eq result 'no-byte-compile)
(message! (dark (white "Ignored %s" short-name)))
total-noop)
((null result)
(message! (red "Failed to compile %s" short-name))
total-fail)
(t
(message! (green "Compiled %s" short-name))
(quiet! (load target t t))
total-ok))))))
(message!
(bold
(color (if (= total-fail 0) 'green 'red)
"%s %s file(s) %s"
(if recompile-p "Recompiled" "Compiled")
(format "%d/%d" total-ok (- (length compile-targets) total-noop))
(format "(%s ignored)" total-noop)))))))))
(defun doom//byte-compile-core (&optional recompile-p)
"Byte compile the core Doom files.
This is faster than `doom//byte-compile', still yields considerable performance
benefits, and is more reliable in an ever-changing Emacs config (since you won't
likely change core files directly).
If RECOMPILE-P is non-nil, only recompile out-of-date core files."
(interactive "P") (interactive "P")
;; Ensure all relevant config files are loaded and up-to-date. This way we (doom//byte-compile (list "core") recompile-p))
;; don't need eval-when-compile and require blocks scattered all over.
(doom-initialize-packages t noninteractive)
(let ((targets
(cond ((equal (car command-line-args-left) "--")
(cl-loop for file in (cdr command-line-args-left)
if (file-exists-p file)
collect (expand-file-name file)
finally do (setq command-line-args-left nil)) )
(t
(append (list (expand-file-name "init.el" doom-emacs-dir)
doom-core-dir)
(unless lite-p (doom--module-paths))))))
(total-success 0)
(total-fail 0)
(total-nocomp 0)
(use-package-expand-minimally t))
(let ((el-files (cl-loop for path in targets
if (file-directory-p path)
nconc (nreverse (directory-files-recursively path "\\.el$"))
else if (file-exists-p path)
collect path)))
(dolist (file el-files)
(when (or (not only-recompile-p)
(let ((elc-file (byte-compile-dest-file file)))
(and (file-exists-p elc-file)
(file-newer-than-file-p file elc-file))))
(let ((result (if (string-match-p "/test/.+\\.el$" file)
'no-byte-compile
(byte-compile-file file)))
(short-name (file-relative-name file doom-emacs-dir)))
(cl-incf
(cond ((eq result 'no-byte-compile)
(message! (dark (white "Ignored %s" short-name)))
total-nocomp)
((null result)
(message! (red "Failed to compile %s" short-name))
total-fail)
(t
(message! (green "Compiled %s" short-name))
(quiet! (load file t t))
total-success))))))
(message!
(bold
(color (if (= total-fail 0) 'green 'red)
"%s %s file(s) %s"
(if only-recompile-p "Recompiled" "Compiled")
(format (if el-files "%d/%d" "%d")
total-success
(- (length el-files) total-nocomp))
(format "(%s ignored)" total-nocomp)))))))
(defun doom/recompile () (defun doom//byte-recompile-plugins ()
"Recompile any out-of-date compiled *.el files in your Emacs configuration." "Recompile all installed plugins. If you're getting odd errors after upgrading
(interactive) (or downgrading) Emacs, this may fix it."
(doom/compile nil :recompile)
;; Forcibly recompile core.el in case `load-path' has changed
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t))
(defun doom/recompile-packages ()
"Recompile all installed elpa packages. If you're getting odd errors after
upgrading Emacs, this may fix it."
(interactive) (interactive)
(byte-recompile-directory package-user-dir 0 t)) (byte-recompile-directory package-user-dir 0 t))
(defun doom/reset () (defun doom//clean-byte-compiled-files ()
"Clear the local cache completely (in `doom-cache-dir'). "Delete all the compiled elc files in your Emacs configuration.
This resets Emacs to a blank slate. You must restart Emacs for some components This excludes compiled packages in `doom-packages-dir'.'"
to feel its effects."
(interactive)
(delete-directory doom-cache-dir t)
(make-directory doom-cache-dir t))
(defun doom/clean-compiled-files ()
"Delete all compiled elc files in your Emacs configuration.
This excludes compiled packages in `doom-packages-dir'."
(interactive) (interactive)
(let ((targets (append (list (expand-file-name "init.elc" doom-emacs-dir)) (let ((targets (append (list (expand-file-name "init.elc" doom-emacs-dir))
(directory-files-recursively doom-core-dir "\\.elc$") (directory-files-recursively doom-core-dir "\\.elc$")
(directory-files-recursively doom-modules-dir "\\.elc$")))) (directory-files-recursively doom-modules-dir "\\.elc$"))))
(unless (cl-loop for path in targets (unless (cl-loop for path in targets
if (file-exists-p path) if (file-exists-p path)
collect path collect path
and do (delete-file path) and do (delete-file path)
and do (message "Deleted %s" (file-relative-name path))) and do (message "Deleted %s" (file-relative-name path)))
(message "Everything is clean")))) (message "Everything is clean"))))

View file

@ -97,6 +97,7 @@ recognized by DOOM's popup system. They are:
("^\\*doom:" :regexp t :size 0.35 :noesc t :select t) ("^\\*doom:" :regexp t :size 0.35 :noesc t :select t)
("^ ?\\*doom " :regexp t :noselect t :autokill t :autoclose t :autofit t) ("^ ?\\*doom " :regexp t :noselect t :autokill t :autoclose t :autofit t)
;; built-in (emacs) ;; built-in (emacs)
("*compilation*" :size 0.25 :noselect t :autokill t :autoclose t)
("*ert*" :same t :modeline t) ("*ert*" :same t :modeline t)
("*info*" :size 0.5 :select t :autokill t) ("*info*" :size 0.5 :select t :autokill t)
("*Backtrace*" :size 20 :noselect t) ("*Backtrace*" :size 20 :noselect t)
@ -110,7 +111,7 @@ recognized by DOOM's popup system. They are:
(grep-mode :size 25 :noselect t :autokill t) (grep-mode :size 25 :noselect t :autokill t)
(profiler-report-mode :size 0.3 :regexp t :autokill t :modeline minimal) (profiler-report-mode :size 0.3 :regexp t :autokill t :modeline minimal)
(tabulated-list-mode :noesc t) (tabulated-list-mode :noesc t)
("^ ?\\*" :regexp t :size 0.3 :noselect t :autokill t :autoclose t :autofit t))) ("^ ?\\*" :regexp t :size 15 :noselect t :autokill t :autoclose t)))
:config :config
(add-hook 'doom-post-init-hook #'shackle-mode) (add-hook 'doom-post-init-hook #'shackle-mode)
@ -137,7 +138,6 @@ recognized by DOOM's popup system. They are:
(define-key map [escape] #'doom/popup-close-maybe) (define-key map [escape] #'doom/popup-close-maybe)
(define-key map (kbd "ESC") #'doom/popup-close-maybe) (define-key map (kbd "ESC") #'doom/popup-close-maybe)
(define-key map [remap quit-window] #'doom/popup-close-maybe) (define-key map [remap quit-window] #'doom/popup-close-maybe)
(define-key map [remap delete-window] #'doom/popup-close-maybe)
(define-key map [remap doom/kill-this-buffer] #'delete-window) (define-key map [remap doom/kill-this-buffer] #'delete-window)
(define-key map [remap split-window-right] #'ignore) (define-key map [remap split-window-right] #'ignore)
(define-key map [remap split-window-below] #'ignore) (define-key map [remap split-window-below] #'ignore)

View file

@ -6,8 +6,7 @@ state are passed in.")
(def-package! projectile (def-package! projectile
:demand t :demand t
:init (add-hook 'doom-init-hook #'projectile-mode) :init
:config
(setq projectile-cache-file (concat doom-cache-dir "projectile.cache") (setq projectile-cache-file (concat doom-cache-dir "projectile.cache")
projectile-enable-caching (not noninteractive) projectile-enable-caching (not noninteractive)
projectile-indexing-method 'alien projectile-indexing-method 'alien
@ -16,10 +15,12 @@ state are passed in.")
projectile-globally-ignored-files '(".DS_Store" "Icon " "TAGS") projectile-globally-ignored-files '(".DS_Store" "Icon " "TAGS")
projectile-globally-ignored-file-suffixes '(".elc" ".pyc" ".o")) projectile-globally-ignored-file-suffixes '(".elc" ".pyc" ".o"))
(add-hook 'doom-init-hook #'projectile-mode)
:config
;; a more generic project root file ;; a more generic project root file
(push ".project" projectile-project-root-files-bottom-up) (push ".project" projectile-project-root-files-bottom-up)
(nconc projectile-globally-ignored-directories (list doom-local-dir ".sync")) (nconc projectile-globally-ignored-directories (list (abbreviate-file-name doom-local-dir) ".sync"))
(nconc projectile-other-file-alist '(("css" . ("scss" "sass" "less" "style")) (nconc projectile-other-file-alist '(("css" . ("scss" "sass" "less" "style"))
("scss" . ("css")) ("scss" . ("css"))
("sass" . ("css")) ("sass" . ("css"))
@ -47,7 +48,7 @@ state are passed in.")
;; Library ;; Library
;; ;;
(defun doom/reload-project () (defun doom//reload-project ()
"Reload the project root cache." "Reload the project root cache."
(interactive) (interactive)
(projectile-invalidate-cache nil) (projectile-invalidate-cache nil)

View file

@ -29,7 +29,7 @@ shorter major mode name in the mode-line. See `doom|set-mode-name'.")
;; Hook(s) ;; Hook(s)
(defvar doom-init-ui-hook nil (defvar doom-init-ui-hook nil
"List of hooks to run when the theme and font is initialized (or reloaded with "List of hooks to run when the theme and font is initialized (or reloaded with
`doom/reload-theme').") `doom//reload-theme').")
;; Settings ;; Settings

View file

@ -5,6 +5,7 @@
;; doom-... public variables or non-interactive functions ;; doom-... public variables or non-interactive functions
;; doom--... private anything (non-interactive), not safe for direct use ;; doom--... private anything (non-interactive), not safe for direct use
;; doom/... an interactive function; safe for M-x or keybinding ;; doom/... an interactive function; safe for M-x or keybinding
;; doom//... an interactive function for managing/maintaining Doom itself
;; doom:... an evil operator, motion or command ;; doom:... an evil operator, motion or command
;; doom|... hook function ;; doom|... hook function
;; doom*... advising functions ;; doom*... advising functions
@ -17,7 +18,7 @@
;; Autoloaded functions are in core/autoload/*.el and modules/*/*/autoload.el or ;; Autoloaded functions are in core/autoload/*.el and modules/*/*/autoload.el or
;; modules/*/*/autoload/*.el. ;; modules/*/*/autoload/*.el.
(defvar doom-version "2.0.6" (defvar doom-version "2.0.7"
"Current version of DOOM emacs.") "Current version of DOOM emacs.")
(defvar doom-debug-mode (or (getenv "DEBUG") init-file-debug) (defvar doom-debug-mode (or (getenv "DEBUG") init-file-debug)
@ -105,6 +106,7 @@ melodramatic ex-vimmer disappointed with the text-editor status quo."
auto-save-list-file-name (concat doom-cache-dir "autosave") auto-save-list-file-name (concat doom-cache-dir "autosave")
backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/"))) backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/")))
pcache-directory (concat doom-cache-dir "pcache/") pcache-directory (concat doom-cache-dir "pcache/")
mc/list-file (concat doom-etc-dir "mc-lists.el")
server-auth-dir (concat doom-cache-dir "server/") server-auth-dir (concat doom-cache-dir "server/")
shared-game-score-directory (concat doom-etc-dir "shared-game-score/") shared-game-score-directory (concat doom-etc-dir "shared-game-score/")
tramp-auto-save-directory (concat doom-cache-dir "tramp-auto-save/") tramp-auto-save-directory (concat doom-cache-dir "tramp-auto-save/")
@ -160,7 +162,8 @@ ability to invoke the debugger in debug mode."
;; reset it to a reasonable default. ;; reset it to a reasonable default.
(setq gc-cons-threshold 16777216 (setq gc-cons-threshold 16777216
gc-cons-percentage 0.1 gc-cons-percentage 0.1
file-name-handler-alist doom--file-name-handler-alist)) file-name-handler-alist doom--file-name-handler-alist)
t)
;;; ;;;

View file

@ -2,7 +2,6 @@
;;; core/packages.el ;;; core/packages.el
;; core packages ;; core packages
(package! async)
(package! s) (package! s)
(package! f) (package! f)

View file

@ -1,4 +1,5 @@
;;; app/email/autoload/evil.el -*- lexical-binding: t; -*- ;; app/email/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload ;;;###autoload
(defun +email/mark (&optional beg end) (defun +email/mark (&optional beg end)

View file

@ -1,2 +0,0 @@
;;; app/irc/autoload/evil.el -*- lexical-binding: t; -*-

View file

@ -1,4 +1,5 @@
;;; completion/company/test/company.el -*- lexical-binding: t; -*- ;; -*- lexical-binding: t; no-byte-compile: t; -*-
;;; completion/company/test/company.el
(require! :completion company) (require! :completion company)
(require 'company) (require 'company)

View file

@ -1,4 +1,5 @@
;;; completion/helm/autoload/evil.el -*- lexical-binding: t; -*- ;;; completion/helm/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+helm:swoop "completion/helm/autoload/evil" nil t) ;;;###autoload (autoload '+helm:swoop "completion/helm/autoload/evil" nil t)
(evil-define-command +helm:swoop (&optional search bang) (evil-define-command +helm:swoop (&optional search bang)

View file

@ -1,2 +0,0 @@
;;; completion/helm/autoload/helm.el -*- lexical-binding: t; -*-

View file

@ -63,7 +63,7 @@
(map! :map global-map (map! :map global-map
[remap apropos] #'helm-apropos [remap apropos] #'helm-apropos
[remap find-file] #'helm-find-files [remap find-file] #'helm-find-files
[remap recentf] #'helm-recentf [remap recentf-open-files] #'helm-recentf
[remap projectile-switch-to-buffer] #'helm-projectile-switch-to-buffer [remap projectile-switch-to-buffer] #'helm-projectile-switch-to-buffer
[remap projectile-recentf] #'helm-projectile-recentf [remap projectile-recentf] #'helm-projectile-recentf
[remap projectile-find-file] #'helm-projectile-find-file [remap projectile-find-file] #'helm-projectile-find-file

View file

@ -1,4 +1,5 @@
;;; completion/ivy/autoload/evil.el -*- lexical-binding: t; -*- ;; completion/ivy/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+ivy:swiper "completion/ivy/autoload/evil" nil t) ;;;###autoload (autoload '+ivy:swiper "completion/ivy/autoload/evil" nil t)
(evil-define-command +ivy:swiper (&optional search) (evil-define-command +ivy:swiper (&optional search)
@ -24,6 +25,9 @@
(directory (or directory project-root)) (directory (or directory project-root))
(recursion-p +ivy--file-search-recursion-p) (recursion-p +ivy--file-search-recursion-p)
(all-files-p +ivy--file-search-all-files-p) (all-files-p +ivy--file-search-all-files-p)
(engine (or engine
(and (executable-find "rg") 'rg)
(and (executable-find "ag") 'ag)))
(query (query
(or query (or query
(if (evil-visual-state-p) (if (evil-visual-state-p)

View file

@ -1,4 +1,5 @@
;;; feature/debugger/autoload/evil.el -*- lexical-binding: t; -*- ;; feature/debugger/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+debugger:start "feature/debugger/autoload/evil" nil t) ;;;###autoload (autoload '+debugger:start "feature/debugger/autoload/evil" nil t)
(evil-define-command +debugger:start (&optional path) (evil-define-command +debugger:start (&optional path)

View file

@ -1,4 +1,5 @@
;;; feature/eval/autoload/evil.el -*- lexical-binding: t; -*- ;; feature/eval/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+eval:region "feature/eval/autoload/evil" nil t) ;;;###autoload (autoload '+eval:region "feature/eval/autoload/evil" nil t)
(evil-define-operator +eval:region (beg end) (evil-define-operator +eval:region (beg end)

View file

@ -1,4 +1,5 @@
;;; feature/evil/autoload/evil.el -*- lexical-binding: t; -*- ;; feature/evil/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload ;;;###autoload
(defun +evil/visual-indent () (defun +evil/visual-indent ()

View file

@ -11,13 +11,12 @@
:init :init
(setq auto-insert-query nil ; Don't prompt before insertion (setq auto-insert-query nil ; Don't prompt before insertion
auto-insert-alist nil) ; Tabula rasa auto-insert-alist nil) ; Tabula rasa
(after! yasnippet
(push '+file-templates-dir yas-snippet-dirs))
:config :config
(auto-insert-mode 1) (auto-insert-mode 1)
(after! yasnippet
(push '+file-templates-dir yas-snippet-dirs))
(defun +file-templates--expand (key &optional mode project-only) (defun +file-templates--expand (key &optional mode project-only)
"Auto insert a snippet of yasnippet into new file." "Auto insert a snippet of yasnippet into new file."
(when (if project-only (doom-project-p) t) (when (if project-only (doom-project-p) t)
@ -32,10 +31,13 @@
(evil-initialize-state 'insert)))) (evil-initialize-state 'insert))))
(defun +file-templates-add (args) (defun +file-templates-add (args)
(cl-destructuring-bind (regexp trigger mode &optional project-only-p) args (cl-destructuring-bind (regexp trigger &optional mode project-only-p) args
(define-auto-insert (define-auto-insert
regexp regexp
(vector `(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p)))))) (if trigger
(vector
`(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p)))
#'ignore))))
(mapc #'+file-templates-add (mapc #'+file-templates-add
;; General ;; General
@ -52,6 +54,7 @@
("/Makefile$" "__" makefile-gmake-mode) ("/Makefile$" "__" makefile-gmake-mode)
;; Elisp ;; Elisp
("\\.el$" "__initfile" emacs-lisp-mode) ("\\.el$" "__initfile" emacs-lisp-mode)
("/.dir-locals.el$" nil)
("-test\\.el$" "__" emacs-ert-mode) ("-test\\.el$" "__" emacs-ert-mode)
("/.emacs.d/.+\\.el$" "__doom-module" emacs-lisp-mode) ("/.emacs.d/.+\\.el$" "__doom-module" emacs-lisp-mode)
("/.emacs.d/.+/packages\\.el$" "__doom-packages" emacs-lisp-mode) ("/.emacs.d/.+/packages\\.el$" "__doom-packages" emacs-lisp-mode)

View file

@ -1,4 +1,5 @@
;;; feature/jump/autoload/evil.el -*- lexical-binding: t; -*- ;;; feature/jump/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+jump:online "feature/jump/autoload/evil" nil t) ;;;###autoload (autoload '+jump:online "feature/jump/autoload/evil" nil t)
(evil-define-command +jump:online (query &optional bang) (evil-define-command +jump:online (query &optional bang)

View file

@ -33,14 +33,18 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
(xref-find-definitions identifier)) (xref-find-definitions identifier))
t)) t))
((and (fboundp 'dumb-jump-go) ((and (require 'dumb-jump nil t)
;; dumb-jump doesn't tell us if it succeeded or not ;; dumb-jump doesn't tell us if it succeeded or not
(let (successful) (let ((old-fn-sym (make-symbol "old-fn"))
(cl-letf (((symbol-function 'dumb-jump-result-follow) successful)
`(lambda (result &optional use-tooltip proj) (cl-letf ((old-fn-sym (symbol-function 'dumb-jump-get-results))
(setq successful t) ((symbol-function 'dumb-jump-get-results)
(,(symbol-function 'dumb-jump-result-follow) (lambda (&optional prompt)
result use-tooltip proj)))) (let* ((plist (funcall old-fn-sym prompt))
(results (plist-get plist :results)))
(when (and results (> (length results) 0))
(setq successful t))
plist))))
(if other-window (if other-window
(dumb-jump-go-other-window) (dumb-jump-go-other-window)
(dumb-jump-go)) (dumb-jump-go))
@ -56,7 +60,7 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
((and (featurep 'evil) ((and (featurep 'evil)
evil-mode evil-mode
(cl-destructuring-bind (beg end) (cl-destructuring-bind (beg . end)
(bounds-of-thing-at-point 'symbol) (bounds-of-thing-at-point 'symbol)
(evil-goto-definition) (evil-goto-definition)
(let ((pt (point))) (let ((pt (point)))

View file

@ -1,4 +1,5 @@
;;; feature/snippets/autoload/evil.el -*- lexical-binding: t; -*- ;;; feature/snippets/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload ;;;###autoload
(defun +snippets/expand-on-region () (defun +snippets/expand-on-region ()

View file

@ -11,6 +11,8 @@
(defvar yas-minor-mode-map (make-sparse-keymap)) (defvar yas-minor-mode-map (make-sparse-keymap))
:init :init
(setq yas-snippet-dirs '(yas-installed-snippets-dir))
;; Ensure `yas-reload-all' is called as late as possible. Other modules could ;; Ensure `yas-reload-all' is called as late as possible. Other modules could
;; have additional configuration for yasnippet. For example, file-templates. ;; have additional configuration for yasnippet. For example, file-templates.
(add-transient-hook! 'yas-minor-mode-hook (yas-reload-all)) (add-transient-hook! 'yas-minor-mode-hook (yas-reload-all))
@ -23,7 +25,6 @@
yas-indent-line 'auto yas-indent-line 'auto
yas-also-auto-indent-first-line t yas-also-auto-indent-first-line t
yas-prompt-functions '(yas-completing-prompt yas-ido-prompt yas-no-prompt) yas-prompt-functions '(yas-completing-prompt yas-ido-prompt yas-no-prompt)
yas-snippet-dirs '(yas-installed-snippets-dir)
yas-use-menu nil yas-use-menu nil
;; Allow nested snippets ;; Allow nested snippets
yas-triggers-in-field t) yas-triggers-in-field t)

View file

@ -1,4 +1,5 @@
;;; feature/workspaces/autoload/evil.el -*- lexical-binding: t; -*- ;;; feature/workspaces/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+workspace:save-session "feature/workspaces/autoload/evil" nil t) ;;;###autoload (autoload '+workspace:save-session "feature/workspaces/autoload/evil" nil t)
(evil-define-command +workspace:save-session (&optional bang name) (evil-define-command +workspace:save-session (&optional bang name)

View file

@ -442,7 +442,7 @@ the workspace and move to the next."
(cl-loop for name in names (cl-loop for name in names
for i to (length names) for i to (length names)
collect collect
(propertize (format " [%d] %s " i name) (propertize (format " [%d] %s " (1+ i) name)
'face (if (equal current-name name) 'face (if (equal current-name name)
'+workspace-tab-selected-face '+workspace-tab-selected-face
'+workspace-tab-face))) '+workspace-tab-face)))

View file

@ -28,7 +28,7 @@ renamed.")
persp-nil-name "nil" persp-nil-name "nil"
persp-nil-hidden t persp-nil-hidden t
persp-auto-save-fname "autosave" persp-auto-save-fname "autosave"
persp-save-dir (concat doom-cache-dir "workspaces/") persp-save-dir (concat doom-etc-dir "workspaces/")
persp-set-last-persp-for-new-frames nil persp-set-last-persp-for-new-frames nil
persp-switch-to-added-buffer nil persp-switch-to-added-buffer nil
persp-remove-buffers-from-nil-persp-behaviour nil persp-remove-buffers-from-nil-persp-behaviour nil

View file

@ -1,2 +0,0 @@
;;; lang/elixir/autoload/elixir.el -*- lexical-binding: t; -*-

View file

@ -15,7 +15,7 @@ This module adds [[https://golang.org][Go]] support.
#+begin_quote #+begin_quote
I have mixed feelings about Go. It's a decent compromise between C and higher-level languages, is pleasantly straight-forward and elegant, but lacks /native/ support for luxuries I miss from other languages, like generics, optional arguments, and function overloading. You've got to learn to love ~interface{}~. I have mixed feelings about Go. It's a decent compromise between C and higher-level languages, is pleasantly straight-forward and elegant, but lacks /native/ support for luxuries I miss from other languages, like generics, optional arguments, and function overloading. You've got to learn to love ~interface{}~.
Still, Go has been a remarkably useful (and fast!) companion for a variety of small-to-medium backend web and CLI projects. Still, Go is a remarkably useful (and fast!) companion for a variety of small-to-medium backend web and CLI projects.
#+end_quote #+end_quote
* Table of Contents :TOC: * Table of Contents :TOC:

View file

@ -1,6 +1,6 @@
#+TITLE: :lang haskell #+TITLE: :lang haskell
This module adds [[https://www.haskell.org/][Haskell]] support. This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://haskell-lang.org/intero][intero]] (the default) or [[https://github.com/jyp/dante][dante]].
+ Code completion (~company-ghc~) + Code completion (~company-ghc~)
+ Look up documentation (~hoogle~) + Look up documentation (~hoogle~)
@ -11,29 +11,40 @@ This module adds [[https://www.haskell.org/][Haskell]] support.
+ [[https://github.com/hlissner/emacs-snippets/tree/master/haskell-mode][Snippets]] + [[https://github.com/hlissner/emacs-snippets/tree/master/haskell-mode][Snippets]]
#+begin_quote #+begin_quote
Haskell contends with C and Ruby as my favorite language. I don't think my Haskell code will ever save the world, but I'll reach for it for small projects and programming exercises (like projecteuler.com or exercism.io). Haskell contends with C and Ruby as my favorite language. My Haskell code will never save the world, but I'll reach for it for small projects and programming exercises (like projecteuler.com or exercism.io).
I'd love to incorporate more of it into my machine learning work, but Python and Julia hold that crown. For now. I'd love to incorporate it into my machine learning work, but Python and Julia hold that crown. For now.
#+end_quote #+end_quote
* Table of Contents :TOC: * Table of Contents :TOC:
- [[#install][Install]] - [[#install][Install]]
- [[#haskell][Haskell]] - [[#intero][Intero]]
- [[#dependencies][Dependencies]] - [[#dante][Dante]]
- [[#troubleshooting][Troubleshooting]] - [[#troubleshooting][Troubleshooting]]
- [[#resources][Resources]] - [[#resources][Resources]]
* Install * Install
** Haskell This module has two submodules: *Intero* or *Dante*. To activate one, specify one or the other in your pubilc ~init.el~, e.g.:
To get started with Haskell, you need *stack* installed.
*** MacOS #+BEGIN_SRC emacs-lisp
(doom! :lang (haskell +intero))
;; or
(doom! :lang (haskell +dante))
#+END_SRC
Your dependencies will change slightly, depending on which you choose:
** Intero
*** Haskell
To get started you must install *stack*:
**** MacOS
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes") #+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
brew install haskell-stack brew install haskell-stack
stack setup stack setup
#+END_SRC #+END_SRC
*** Arch Linux **** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes") #+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --needed --noconfirm -S stack sudo pacman --needed --noconfirm -S stack
# Replace pacaur with your AUR package manager of choice # Replace pacaur with your AUR package manager of choice
@ -41,8 +52,8 @@ pacaur --needed --noconfirm -S ncurses5-compat-lib
stack setup stack setup
#+END_SRC #+END_SRC
** Dependencies *** External dependencies
This module requires ~ghc-mod~ (as well as ~intero~, but those will be automatically installed). This module requires ~ghc-mod~.
#+BEGIN_SRC sh #+BEGIN_SRC sh
stack install ghc-mod stack install ghc-mod
@ -55,9 +66,41 @@ Also ensure that ~\~/.local/bin~ is in ~PATH~:
export PATH="~/.local/bin:$PATH" export PATH="~/.local/bin:$PATH"
#+END_SRC #+END_SRC
** Dante
*** Haskell
To get started with Dante and Haskell, you must install cabal
+ cabal (the haskell package builder)
+ ghc/ghci (the compiler, syntax checker & repl)
**** MacOS
#+BEGIN_SRC sh
brew install cabal-install ghc
#+END_SRC
**** Arch Linux
#+BEGIN_SRC sh
sudo pacman --needed --noconfirm -S cabal-install ghc
#+END_SRC
*** External dependencies
Dante requires ~ghc-mod~ and ~hoogle~:
#+BEGIN_SRC sh
cabal update
cabal install happy haskell-src-exts # ghc-mod/hoogle dependencies
cabal ghc-mod hoogle
#+END_SRC
And add Cabal's bin path to $PATH:
#+BEGIN_SRC sh
export PATH="$HOME/.cabal/bin:$PATH"
#+END_SRC
* Troubleshooting * Troubleshooting
+ Stack users: if a ~dist/setup-config~ file exists in your project, [[ https://github.com/DanielG/ghc-mod/wiki#known-issues-related-to-stack][ghc-mod may + Stack users: a ~dist/setup-config~ in your project may cause [[ https://github.com/DanielG/ghc-mod/wiki#known-issues-related-to-stack][ghc-mod to not
refuse to work]]. work]].
* Resources * Resources
Here are a few resources I've found indespensible in my Haskell adventures: Here are a few resources I've found indespensible in my Haskell adventures:
@ -65,3 +108,4 @@ Here are a few resources I've found indespensible in my Haskell adventures:
+ [[http://learnyouahaskell.com/][Learn you a haskell for great good]] + [[http://learnyouahaskell.com/][Learn you a haskell for great good]]
+ [[http://haskellbook.com/][Haskell Programming from first principles]] + [[http://haskellbook.com/][Haskell Programming from first principles]]
+ [[https://github.com/krispo/awesome-haskell][Awesome Haskell]]: an extensive list of haskell resources + [[https://github.com/krispo/awesome-haskell][Awesome Haskell]]: an extensive list of haskell resources
+ [[https://docs.haskellstack.org/en/stable/README/][The Haskell Tool Stack docs]]

View file

@ -46,9 +46,9 @@
(map! :map java-mode-map (map! :map java-mode-map
:localleader :localleader
:nv "r" #'+java/refactor-menu "r" #'+java/refactor-menu
:nv "c" #'+java/compile-menu "c" #'+java/compile-menu
:nv "p" #'+java/project-menu)) "p" #'+java/project-menu))
(def-package! company-emacs-eclim (def-package! company-emacs-eclim

View file

@ -2,6 +2,8 @@
(def-package! meghanada (def-package! meghanada
:commands meghanada-mode :commands meghanada-mode
:init
(add-hook! 'java-mode-hook #'(meghanada-mode rainbow-delimiters-mode))
:config :config
(setq meghanada-server-install-dir (concat doom-etc-dir "meghanada-server/") (setq meghanada-server-install-dir (concat doom-etc-dir "meghanada-server/")
meghanada-use-company (featurep! :completion company) meghanada-use-company (featurep! :completion company)
@ -9,12 +11,10 @@
meghanada-use-eldoc t meghanada-use-eldoc t
meghanada-use-auto-start t) meghanada-use-auto-start t)
(add-hook 'java-mode-hook #'(rainbow-delimiters-mode eldoc-mode))
;; Setup on first use ;; Setup on first use
(meghanada-install-server) (meghanada-install-server)
(if (file-exists-p (meghanada--locate-server-jar)) (if (file-exists-p (meghanada--locate-server-jar))
(add-hook! 'java-mode-hook #'(meghanada-mode flycheck-mode)) (add-hook! 'meghanada-mode-hook #'(flycheck-mode eldoc-mode))
(warn "java-mode: meghanada-server not installed, java-mode will run with reduced functionality")) (warn "java-mode: meghanada-server not installed, java-mode will run with reduced functionality"))
(set! :jump 'java-mode (set! :jump 'java-mode

View file

@ -86,7 +86,7 @@
(unless (executable-find "phpctags") (unless (executable-find "phpctags")
(warn "php-mode: phpctags isn't installed, auto-completion will be gimped")) (warn "php-mode: phpctags isn't installed, auto-completion will be gimped"))
(setq ac-php-tags-path (concat doom-cache-dir "ac-php/"))) (setq ac-php-tags-path (concat doom-etc-dir "ac-php/")))
;; ;;

View file

@ -0,0 +1,51 @@
#+TITLE: :lang rust
#+begin_quote
This module is a work in progress.
#+end_quote
This module adds [[https://www.rust-lang.org][Rust]] support to Emacs.
+ Code completion (~racer~)
+ Syntax checking (~flycheck~)
+ Eldoc support (~go-eldoc~)
+ [[https://github.com/hlissner/emacs-snippets/tree/master/rust-mode][Snippets]]
#+begin_quote
...
#+end_quote
* Table of Contents :TOC:
- [[#install][Install]]
- [[#rust][Rust]]
- [[#dependencies][Dependencies]]
* Install
** Rust
To get started with Rust, you can either use =rustup= and install rust with:
~curl https://sh.rustup.rs -sSf | sh~
Or through your package manager (which is my preference):
*** MacOS
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
brew install rust
cargo install racer
#+END_SRC
*** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --needed --noconfirm -S rust rust-racer
#+END_SRC
** Dependencies
This module requires ~racer~ for code completion, which also requires access to Rust's source code.
#+BEGIN_SRC sh
cargo install racer
git clone https://github.com/rust-lang/rust $RUST_SRC_PATH
#+END_SRC
Either set ~$RUST_SRC_PATH~ in your shell (so that it's available in Emacs), or adjust ~+rust-src-dir~ to point at the correct directory.

View file

@ -24,13 +24,15 @@
:init :init
(add-hook! 'rust-mode-hook #'(racer-mode eldoc-mode flycheck-rust-setup)) (add-hook! 'rust-mode-hook #'(racer-mode eldoc-mode flycheck-rust-setup))
:config :config
(setq racer-cmd (expand-file-name "racer/target/release/racer" +rust-src-dir) (setq racer-cmd (or (executable-find "racer")
racer-rust-src-path (expand-file-name "rust/src/" +rust-src-dir)) (expand-file-name "racer/target/release/racer" +rust-src-dir))
racer-rust-src-path (or (getenv "RUST_SRC_PATH")
(set! :jump 'rust-mode :definition #'racer-find-definition) (expand-file-name "rust/src/" +rust-src-dir)))
(unless (file-exists-p racer-cmd) (unless (file-exists-p racer-cmd)
(warn "rust-mode: racer binary can't be found; auto-completion is disabled"))) (warn "rust-mode: racer binary can't be found; auto-completion is disabled"))
(set! :jump 'rust-mode :definition #'racer-find-definition))
(def-package! company-racer (def-package! company-racer

View file

@ -8,7 +8,7 @@
(while (while
(and (setq res (and (setq res
(re-search-forward (re-search-forward
"\\(\\$\\)\\({.+?}\\|\\<.+?\\>\\)" "[^\\]\\(\\$\\)\\({.+?}\\|\\<[a-zA-Z0-9_]+\\|[@*#!]\\)"
limit t)) limit t))
(not (eq (nth 3 (syntax-ppss)) ?\")))) (not (eq (nth 3 (syntax-ppss)) ?\"))))
res))) res)))
@ -20,7 +20,7 @@
(let (res) (let (res)
(while (while
(and (setq res (and (setq res
(re-search-forward "\\(\\$(.+?)\\|`.+?`\\)" (re-search-forward "[^\\]\\(\\$(.+?)\\|`.+?`\\)"
limit t)) limit t))
(not (eq (nth 3 (syntax-ppss)) ?\")))) (not (eq (nth 3 (syntax-ppss)) ?\"))))
res))) res)))

View file

@ -2,10 +2,9 @@
(defvar +sh-builtin-keywords (defvar +sh-builtin-keywords
'("cat" "cat" "cd" "chmod" "chown" "cp" "curl" "date" "echo" "find" "git" '("cat" "cat" "cd" "chmod" "chown" "cp" "curl" "date" "echo" "find" "git"
"grep" "head" "kill" "less" "ls" "make" "mkdir" "mv" "pgrep" "pkill" "pwd" "grep" "kill" "less" "ls" "make" "mkdir" "mv" "pgrep" "pkill" "pwd"
"rm" "sleep" "sudo" "tail" "tee" "touch") "rm" "sleep" "sudo" "touch")
"A list of common shell commands and keywords to be fontified especially in "A list of common shell commands to be fontified especially in `sh-mode'.")
`sh-mode'.")
;; ;;
@ -24,17 +23,22 @@
(setq sh-indent-after-continuation 'always) (setq sh-indent-after-continuation 'always)
;; recognize function names with dashes in them
(push '((sh . ((nil "^\\s-*function\\s-+\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*\\(?:()\\)?" 1)
(nil "^\\s-*\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*()" 1))))
sh-imenu-generic-expression)
;; 1. Fontifies variables in double quotes ;; 1. Fontifies variables in double quotes
;; 2. Fontify command substitution in double quotes ;; 2. Fontify command substitution in double quotes
;; 3. Fontify built-in/common commands (see `+sh-builtin-keywords') ;; 3. Fontify built-in/common commands (see `+sh-builtin-keywords')
(font-lock-add-keywords (font-lock-add-keywords
'sh-mode `((+sh--match-variables-in-quotes 'sh-mode `((+sh--match-variables-in-quotes
(1 'default prepend) (1 'font-lock-constant-face prepend)
(2 'font-lock-variable-name-face prepend)) (2 'font-lock-variable-name-face prepend))
(+sh--match-command-subst-in-quotes (+sh--match-command-subst-in-quotes
(0 'sh-quoted-exec prepend)) (1 'sh-quoted-exec prepend))
(,(regexp-opt +sh-builtin-keywords 'words) (,(regexp-opt +sh-builtin-keywords 'words)
(0 'font-lock-builtin-face append)))) (0 'font-lock-type-face append))))
;; autoclose backticks ;; autoclose backticks
(sp-local-pair 'sh-mode "`" nil :unless '(sp-point-before-word-p sp-point-before-same-p)) (sp-local-pair 'sh-mode "`" nil :unless '(sp-point-before-word-p sp-point-before-same-p))

View file

@ -1,4 +1,5 @@
;;; lang/html/autoload/evil.el -*- lexical-binding: t; -*- ;;; lang/html/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t) ;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t)
(evil-define-operator +web:encode-html-entities (beg end &optional input) (evil-define-operator +web:encode-html-entities (beg end &optional input)

View file

@ -1,7 +1,7 @@
;;; lang/web/autoload/html.el -*- lexical-binding: t; -*- ;;; lang/web/autoload/html.el -*- lexical-binding: t; -*-
(defvar +web-entities-list (defvar +web-entities-list
[["&nbsp;" " "] ["&ensp;" ""] ["&emsp;" ""] ["&thinsp;" ""] [["&amp;" "&"] ["&nbsp;" " "] ["&ensp;" ""] ["&emsp;" ""] ["&thinsp;" ""]
["&rlm;" ""] ["&lrm;" ""] ["&zwj;" ""] ["&zwnj;" ""] ["&rlm;" ""] ["&lrm;" ""] ["&zwj;" ""] ["&zwnj;" ""]
["&iexcl;" "¡"] ["&cent;" "¢"] ["&pound;" "£"] ["&curren;" "¤"] ["&yen;" "¥"] ["&iexcl;" "¡"] ["&cent;" "¢"] ["&pound;" "£"] ["&curren;" "¤"] ["&yen;" "¥"]
["&brvbar;" "¦"] ["&sect;" "§"] ["&uml;" "¨"] ["&copy;" "©"] ["&ordf;" "ª"] ["&brvbar;" "¦"] ["&sect;" "§"] ["&uml;" "¨"] ["&copy;" "©"] ["&ordf;" "ª"]

View file

@ -1,2 +0,0 @@
;;; lang/web/autoload/web.el -*- lexical-binding: t; -*-

View file

@ -1,4 +1,5 @@
;;; org/org-attach/autoload/evil.el -*- lexical-binding: t; -*- ;; org/org-attach/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;; TODO +org-attach:find ;; TODO +org-attach:find

View file

@ -2,6 +2,28 @@
(add-hook 'org-load-hook #'+org-babel|init t) (add-hook 'org-load-hook #'+org-babel|init t)
(defvar +org-babel-languages
'(calc
css
emacs-lisp
haskell
js
latex
ledger
lilypond
lisp
matlab
plantuml
python
restclient ; ob-restclient
ruby
rust ; ob-rust
shell
sqlite
sql-mode ; ob-sql-mode
translate) ; ob-translate
"A list of org-babel languages to load.")
(defun +org-babel|init () (defun +org-babel|init ()
(setq org-src-fontify-natively t ; make code pretty (setq org-src-fontify-natively t ; make code pretty
org-src-preserve-indentation t ; use native major-mode indentation org-src-preserve-indentation t ; use native major-mode indentation
@ -11,27 +33,11 @@
(org-babel-do-load-languages (org-babel-do-load-languages
'org-babel-load-languages 'org-babel-load-languages
(mapcar (lambda (sym) (cons sym t)) (cl-loop for sym in +org-babel-languages
'(calc collect (cons sym t)))
css
emacs-lisp ;; I prefer C-c C-c for confirming over the default C-c '
haskell (map! :map org-src-mode-map "C-c C-c" #'org-edit-src-exit)
js
latex
ledger
lilypond
lisp
matlab
plantuml
python
restclient ; ob-restclient
ruby
rust ; ob-rust
shell
sqlite
sql-mode ; ob-sql-mode
translate ; ob-translate
)))
;; In a recent update, `org-babel-get-header' was removed from org-mode, which ;; In a recent update, `org-babel-get-header' was removed from org-mode, which
;; is something a fair number of babel plugins use. So until those plugins ;; is something a fair number of babel plugins use. So until those plugins
@ -42,11 +48,7 @@
if (funcall fn (eq (car p) key)) if (funcall fn (eq (car p) key))
collect p)) collect p))
;; I prefer C-c C-c for confirming over the default C-c '
(map! :map org-src-mode-map "C-c C-c" #'org-edit-src-exit)
(defun +org|src-mode-remove-header () (defun +org|src-mode-remove-header ()
"Remove header-line with keybinding help; I know the keybinds." "Remove header-line with keybinding help; I know the keybinds."
(when header-line-format (setq header-line-format nil))
(setq header-line-format nil)))
(add-hook 'org-src-mode-hook #'+org|src-mode-remove-header)) (add-hook 'org-src-mode-hook #'+org|src-mode-remove-header))

View file

@ -1,4 +1,5 @@
;;; org/org-capture/autoload/evil.el -*- lexical-binding: t; -*- ;;; org/org-capture/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+org-capture:open "org/org-capture/autoload/evil" nil t) ;;;###autoload (autoload '+org-capture:open "org/org-capture/autoload/evil" nil t)
(evil-define-operator +org-capture:open (&optional beg end) (evil-define-operator +org-capture:open (&optional beg end)

View file

@ -0,0 +1,15 @@
;;; org/org/autoload/org-link.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +org-link-read-file (key dir)
(let ((file (read-file-name (format "%s: " (capitalize key)) dir)))
(format "%s:%s"
key
(file-relative-name file dir))))
;;;###autoload
(defun +org-link-read-directory (key dir)
(let ((file (read-directory-name (format "%s: " (capitalize key)) dir)))
(format "%s:%s"
key
(file-relative-name file dir))))

View file

@ -71,7 +71,8 @@ If on a:
(goto-char (org-element-property :post-affiliated context)) (goto-char (org-element-property :post-affiliated context))
(call-interactively #'org-footnote-action)) (call-interactively #'org-footnote-action))
((or `planning `timestamp) (org-follow-timestamp-link)) ((or `planning `timestamp)
(org-follow-timestamp-link))
((or `table `table-row) ((or `table `table-row)
(if (org-at-TBLFM-p) (if (org-at-TBLFM-p)
@ -199,15 +200,12 @@ wrong places)."
((memq type '(table table-row)) ((memq type '(table table-row))
(pcase direction (pcase direction
('below (org-table-insert-row t)) ('below (org-table-insert-row t))
('above (+org/table-prepend-row-or-shift-up)))) ('above (org-shiftmetadown))))
((memq type '(headline inlinetask)) ((memq type '(headline inlinetask))
(let* ((subcontext (org-element-context)) (let ((level (if (eq (org-element-type context) 'headline)
(level (save-excursion (org-element-property :level context)
(org-back-to-heading) 1)))
(if (eq (org-element-type subcontext) 'headline)
(org-element-property :level subcontext)
1))))
(pcase direction (pcase direction
('below ('below
(let ((at-eol (= (point) (1- (line-end-position))))) (let ((at-eol (= (point) (1- (line-end-position)))))
@ -272,7 +270,7 @@ with `org-cycle'). Also:
(interactive) (interactive)
(save-excursion (save-excursion
(org-beginning-of-line) (org-beginning-of-line)
(cond ((org-table-p) (cond ((org-at-table-p)
(org-table-align)) (org-table-align))
((org-in-src-block-p) ((org-in-src-block-p)
(org-babel-remove-result)) (org-babel-remove-result))

View file

@ -51,16 +51,3 @@ re-align the table if necessary. (Necessary because org-mode has a
(interactive) (interactive)
(if (org-at-table-p) (org-shiftmetaright) (org-shiftmetaleft))) (if (org-at-table-p) (org-shiftmetaright) (org-shiftmetaleft)))
;;;###autoload
(defun +org/table-append-row-or-shift-down ()
(interactive)
(org-shiftmetadown)
(when (org-at-table-p) (org-metadown)))
;;;###autoload
(defun +org/table-prepend-row-or-shift-up ()
(interactive)
(if (org-at-table-p)
(org-shiftmetadown)
(org-shiftmetaup)))

View file

@ -122,9 +122,10 @@
org-startup-indented t org-startup-indented t
org-startup-with-inline-images nil org-startup-with-inline-images nil
org-tags-column 0 org-tags-column 0
org-todo-keywords '((sequence "[ ](t)" "[-](p)" "[?](m)" "|" "[X](d)") org-todo-keywords
(sequence "TODO(T)" "|" "DONE(D)") '((sequence "[ ](t)" "[-](p)" "[?](m)" "|" "[X](d)")
(sequence "IDEA(i)" "NEXT(n)" "ACTIVE(a)" "WAITING(w)" "LATER(l)" "|" "CANCELLED(c)")) (sequence "TODO(T)" "|" "DONE(D)")
(sequence "NEXT(n)" "ACTIVE(a)" "WAITING(w)" "LATER(l)" "|" "CANCELLED(c)"))
org-use-sub-superscripts '{} org-use-sub-superscripts '{}
outline-blank-line t outline-blank-line t
@ -138,11 +139,15 @@
'default) 'default)
:background nil t))) :background nil t)))
;; Use ivy/helm if either is available ;; Custom links
(when (or (featurep! :completion ivy) (org-link-set-parameters
(featurep! :completion helm)) "org"
(setq-default org-completion-use-ido nil :complete (lambda () (+org-link-read-file "org" +org-dir))
org-outline-path-complete-in-steps nil))) :follow (lambda (link) (find-file (expand-file-name link +org-dir)))
:face (lambda (link)
(if (file-exists-p (expand-file-name link +org-dir))
'org-link
'error))))
(defun +org-init-keybinds () (defun +org-init-keybinds ()
"Sets up org-mode and evil keybindings. Tries to fix the idiosyncrasies "Sets up org-mode and evil keybindings. Tries to fix the idiosyncrasies
@ -164,8 +169,8 @@ between the two."
;; Expand tables (or shiftmeta move) ;; Expand tables (or shiftmeta move)
:ni "C-S-l" #'+org/table-append-field-or-shift-right :ni "C-S-l" #'+org/table-append-field-or-shift-right
:ni "C-S-h" #'+org/table-prepend-field-or-shift-left :ni "C-S-h" #'+org/table-prepend-field-or-shift-left
:ni "C-S-k" #'+org/table-prepend-row-or-shift-up :ni "C-S-k" #'org-metaup
:ni "C-S-j" #'+org/table-append-row-or-shift-down :ni "C-S-j" #'org-metadown
:n [tab] #'+org/toggle-fold :n [tab] #'+org/toggle-fold
:i [tab] #'+org/indent-or-next-field-or-yas-expand :i [tab] #'+org/indent-or-next-field-or-yas-expand

View file

@ -20,64 +20,61 @@
(map! (map!
;; --- Global keybindings --------------------------- ;; --- Global keybindings ---------------------------
;; Make M-x available everywhere ;; Make M-x available everywhere
:nvime "M-x" #'execute-extended-command :gnvime "M-x" #'execute-extended-command
:nvime "A-x" #'execute-extended-command :gnvime "A-x" #'execute-extended-command
;; Emacs debug utilities ;; Emacs debug utilities
"M-;" #'eval-expression :gnvime "M-;" #'eval-expression
:nvime "M-;" #'eval-expression :gnvime "M-:" #'doom/open-scratch-buffer
"M-:" #'doom/open-scratch-buffer
:nvime "M-:" #'doom/open-scratch-buffer
;; Text-scaling ;; Text-scaling
"M-+" (λ! (text-scale-set 0)) "M-+" (λ! (text-scale-set 0))
"M-=" #'text-scale-increase "M-=" #'text-scale-increase
"M--" #'text-scale-decrease "M--" #'text-scale-decrease
;; Simple window navigation/manipulation ;; Simple window navigation/manipulation
"C-`" #'doom/popup-toggle "C-`" #'doom/popup-toggle
"C-~" #'doom/popup-raise "C-~" #'doom/popup-raise
"M-t" #'+workspace/new "M-t" #'+workspace/new
"M-T" #'+workspace/display "M-T" #'+workspace/display
"M-w" #'delete-window "M-w" #'delete-window
"M-W" #'+workspace/close-workspace-or-frame "M-W" #'+workspace/close-workspace-or-frame
"M-n" #'evil-buffer-new "M-n" #'evil-buffer-new
"M-N" #'make-frame "M-N" #'make-frame
"M-1" (λ! (+workspace/switch-to 0)) "M-1" (λ! (+workspace/switch-to 0))
"M-2" (λ! (+workspace/switch-to 1)) "M-2" (λ! (+workspace/switch-to 1))
"M-3" (λ! (+workspace/switch-to 2)) "M-3" (λ! (+workspace/switch-to 2))
"M-4" (λ! (+workspace/switch-to 3)) "M-4" (λ! (+workspace/switch-to 3))
"M-5" (λ! (+workspace/switch-to 4)) "M-5" (λ! (+workspace/switch-to 4))
"M-6" (λ! (+workspace/switch-to 5)) "M-6" (λ! (+workspace/switch-to 5))
"M-7" (λ! (+workspace/switch-to 6)) "M-7" (λ! (+workspace/switch-to 6))
"M-8" (λ! (+workspace/switch-to 7)) "M-8" (λ! (+workspace/switch-to 7))
"M-9" (λ! (+workspace/switch-to 8)) "M-9" (λ! (+workspace/switch-to 8))
"M-0" #'+workspace/switch-to-last "M-0" #'+workspace/switch-to-last
;; Other sensible, textmate-esque global bindings ;; Other sensible, textmate-esque global bindings
"M-r" #'+eval/buffer :ne "M-r" #'+eval/buffer
"M-R" #'+eval/region-and-replace :ne "M-R" #'+eval/region-and-replace
"M-b" #'+eval/build :ne "M-b" #'+eval/build
"M-a" #'mark-whole-buffer :ne "M-a" #'mark-whole-buffer
"M-c" #'evil-yank :ne "M-c" #'evil-yank
"M-q" (if (daemonp) #'delete-frame #'save-buffers-kill-emacs) :ne "M-q" (if (daemonp) #'delete-frame #'save-buffers-kill-emacs)
"M-s" #'save-buffer :ne "M-f" #'swiper
"M-v" #'clipboard-yank :ne "C-M-f" #'doom/toggle-fullscreen
"M-f" #'swiper :n "M-s" #'save-buffer
"C-M-f" #'doom/toggle-fullscreen :m "A-j" #'+hlissner:multi-next-line
:m "A-j" #'+hlissner:multi-next-line :m "A-k" #'+hlissner:multi-previous-line
:m "A-k" #'+hlissner:multi-previous-line
:nv "C-SPC" #'+evil:fold-toggle :nv "C-SPC" #'+evil:fold-toggle
:gnvimer "M-v" #'clipboard-yank
;; Easier window navigation ;; Easier window navigation
:en "C-h" #'evil-window-left :en "C-h" #'evil-window-left
:en "C-j" #'evil-window-down :en "C-j" #'evil-window-down
:en "C-k" #'evil-window-up :en "C-k" #'evil-window-up
:en "C-l" #'evil-window-right :en "C-l" #'evil-window-right
(:prefix "C-x" "C-x p" #'doom/other-popup
"p" #'doom/other-popup)
;; --- <leader> ------------------------------------- ;; --- <leader> -------------------------------------
(:leader (:leader
:desc "Ex command" :nv ";" #'evil-ex :desc "Ex command" :nv ";" #'evil-ex
:desc "M-x" :nv ":" #'execute-extended-command :desc "M-x" :nv ":" #'execute-extended-command
:desc "Pop up scratch buffer" :nv "x" #'doom/open-scratch-buffer :desc "Pop up scratch buffer" :nv "x" #'doom/open-scratch-buffer
:desc "Org Capture" :nv "X" #'+org-capture/open :desc "Org Capture" :nv "X" #'+org-capture/open
@ -92,30 +89,30 @@
:desc "Jump to bookmark" :n "RET" #'bookmark-jump :desc "Jump to bookmark" :n "RET" #'bookmark-jump
;; C-u is used by evil ;; C-u is used by evil
:desc "Universal argument" :n "u" #'universal-argument :desc "Universal argument" :n "u" #'universal-argument
:desc "window" :n "w" evil-window-map :desc "window" :n "w" evil-window-map
(:desc "previous..." :prefix "[" (:desc "previous..." :prefix "["
:desc "Text size" :nv "[" #'text-scale-decrease :desc "Text size" :nv "[" #'text-scale-decrease
:desc "Buffer" :nv "b" #'doom/previous-buffer :desc "Buffer" :nv "b" #'doom/previous-buffer
:desc "Diff Hunk" :nv "d" #'git-gutter:previous-hunk :desc "Diff Hunk" :nv "d" #'git-gutter:previous-hunk
:desc "Todo" :nv "t" #'hl-todo-previous :desc "Todo" :nv "t" #'hl-todo-previous
:desc "Error" :nv "e" #'previous-error :desc "Error" :nv "e" #'previous-error
:desc "Workspace" :nv "w" #'+workspace/switch-left :desc "Workspace" :nv "w" #'+workspace/switch-left
:desc "Smart jump" :nv "h" #'smart-backward :desc "Smart jump" :nv "h" #'smart-backward
:desc "Spelling error" :nv "s" #'evil-prev-flyspell-error :desc "Spelling error" :nv "s" #'evil-prev-flyspell-error
:desc "Spelling correction" :n "S" #'flyspell-correct-previous-word-generic) :desc "Spelling correction" :n "S" #'flyspell-correct-previous-word-generic)
(:desc "next..." :prefix "]" (:desc "next..." :prefix "]"
:desc "Text size" :nv "]" #'text-scale-increase :desc "Text size" :nv "]" #'text-scale-increase
:desc "Buffer" :nv "b" #'doom/next-buffer :desc "Buffer" :nv "b" #'doom/next-buffer
:desc "Diff Hunk" :nv "d" #'git-gutter:next-hunk :desc "Diff Hunk" :nv "d" #'git-gutter:next-hunk
:desc "Todo" :nv "t" #'hl-todo-next :desc "Todo" :nv "t" #'hl-todo-next
:desc "Error" :nv "e" #'next-error :desc "Error" :nv "e" #'next-error
:desc "Workspace" :nv "w" #'+workspace/switch-right :desc "Workspace" :nv "w" #'+workspace/switch-right
:desc "Smart jump" :nv "l" #'smart-forward :desc "Smart jump" :nv "l" #'smart-forward
:desc "Spelling error" :nv "s" #'evil-next-flyspell-error :desc "Spelling error" :nv "s" #'evil-next-flyspell-error
:desc "Spelling correction" :n "S" #'flyspell-correct-word-generic) :desc "Spelling correction" :n "S" #'flyspell-correct-word-generic)
(:desc "search" :prefix "/" (:desc "search" :prefix "/"
:desc "Swiper" :nv "/" #'swiper :desc "Swiper" :nv "/" #'swiper
@ -188,63 +185,64 @@
:desc "Yank filename" :n "y" #'+hlissner/yank-buffer-filename) :desc "Yank filename" :n "y" #'+hlissner/yank-buffer-filename)
(:desc "git" :prefix "g" (:desc "git" :prefix "g"
:desc "Git status" :n "s" #'magit-status :desc "Git status" :n "S" #'magit-status
:desc "Git blame" :n "b" #'magit-blame :desc "Git blame" :n "b" #'magit-blame
:desc "Git time machine" :n "t" #'git-timemachine-toggle :desc "Git time machine" :n "t" #'git-timemachine-toggle
:desc "Git revert hunk" :n "r" #'git-gutter:revert-hunk :desc "Git stage hunk" :n "s" #'git-gutter:stage-hunk
:desc "Git revert buffer" :n "R" #'vc-revert :desc "Git revert hunk" :n "r" #'git-gutter:revert-hunk
:desc "List gists" :n "g" #'+gist:list :desc "Git revert buffer" :n "R" #'vc-revert
:desc "Next hunk" :nv "]" #'git-gutter:next-hunk :desc "List gists" :n "g" #'+gist:list
:desc "Previous hunk" :nv "[" #'git-gutter:previous-hunk) :desc "Next hunk" :nv "]" #'git-gutter:next-hunk
:desc "Previous hunk" :nv "[" #'git-gutter:previous-hunk)
(:desc "help" :prefix "h" (:desc "help" :prefix "h"
:n "h" help-map :n "h" help-map
:desc "Apropos" :n "a" #'apropos :desc "Apropos" :n "a" #'apropos
:desc "Reload theme" :n "R" #'doom/reload-theme :desc "Reload theme" :n "R" #'doom/reload-theme
:desc "Find library" :n "l" #'find-library :desc "Find library" :n "l" #'find-library
:desc "Toggle Emacs log" :n "m" #'doom/popup-toggle-messages :desc "Toggle Emacs log" :n "m" #'doom/popup-toggle-messages
:desc "Command log" :n "L" #'global-command-log-mode :desc "Command log" :n "L" #'global-command-log-mode
:desc "Describe function" :n "f" #'describe-function :desc "Describe function" :n "f" #'describe-function
:desc "Describe key" :n "k" #'describe-key :desc "Describe key" :n "k" #'describe-key
:desc "Describe char" :n "c" #'describe-char :desc "Describe char" :n "c" #'describe-char
:desc "Describe mode" :n "M" #'describe-mode :desc "Describe mode" :n "M" #'describe-mode
:desc "Describe variable" :n "v" #'describe-variable :desc "Describe variable" :n "v" #'describe-variable
:desc "Describe face" :n "F" #'describe-face :desc "Describe face" :n "F" #'describe-face
:desc "Describe DOOM setting" :n "s" #'doom/describe-setting :desc "Describe DOOM setting" :n "s" #'doom/describe-setting
:desc "Describe DOOM module" :n "d" #'doom/describe-module :desc "Describe DOOM module" :n "d" #'doom/describe-module
:desc "Find definition" :n "." #'+jump/definition :desc "Find definition" :n "." #'+jump/definition
:desc "Find references" :n "/" #'+jump/references :desc "Find references" :n "/" #'+jump/references
:desc "Find documentation" :n "h" #'+jump/documentation :desc "Find documentation" :n "h" #'+jump/documentation
:desc "What face" :n "'" #'doom/what-face :desc "What face" :n "'" #'doom/what-face
:desc "What minor modes" :n ";" #'doom/what-minor-mode :desc "What minor modes" :n ";" #'doom/what-minor-mode
:desc "Info" :n "i" #'info :desc "Info" :n "i" #'info
:desc "Toggle profiler" :n "p" #'doom/toggle-profiler) :desc "Toggle profiler" :n "p" #'doom/toggle-profiler)
(:desc "insert" :prefix "i" (:desc "insert" :prefix "i"
:desc "From kill-ring" :nv "y" #'counsel-yank-pop :desc "From kill-ring" :nv "y" #'counsel-yank-pop
:desc "From snippet" :nv "s" #'yas-insert-snippet) :desc "From snippet" :nv "s" #'yas-insert-snippet)
(:desc "notes" :prefix "n" (:desc "notes" :prefix "n"
:desc "Find file in notes" :n "n" #'+hlissner/find-in-notes :desc "Find file in notes" :n "n" #'+hlissner/find-in-notes
:desc "Browse notes" :n "N" #'+hlissner/browse-notes :desc "Browse notes" :n "N" #'+hlissner/browse-notes
:desc "Org capture" :n "x" #'+org-capture/open :desc "Org capture" :n "x" #'+org-capture/open
:desc "Browse mode notes" :n "m" #'+org/browse-notes-for-major-mode :desc "Browse mode notes" :n "m" #'+org/browse-notes-for-major-mode
:desc "Browse project notes" :n "p" #'+org/browse-notes-for-project) :desc "Browse project notes" :n "p" #'+org/browse-notes-for-project)
(:desc "open" :prefix "o" (:desc "open" :prefix "o"
:desc "Default browser" :n "b" #'browse-url-of-file :desc "Default browser" :n "b" #'browse-url-of-file
:desc "Debugger" :n "d" #'+debug/open :desc "Debugger" :n "d" #'+debug/open
:desc "REPL" :n "r" #'+eval/open-repl :desc "REPL" :n "r" #'+eval/open-repl
:v "r" #'+eval:repl :v "r" #'+eval:repl
:desc "Neotree" :n "n" #'+neotree/toggle :desc "Neotree" :n "n" #'+neotree/toggle
:desc "Terminal" :n "t" #'+term/open-popup :desc "Terminal" :n "t" #'+term/open-popup
:desc "Terminal in project" :n "T" #'+term/open-popup-in-project :desc "Terminal in project" :n "T" #'+term/open-popup-in-project
;; applications ;; applications
:desc "APP: elfeed" :n "E" #'=rss :desc "APP: elfeed" :n "E" #'=rss
:desc "APP: email" :n "M" #'=email :desc "APP: email" :n "M" #'=email
:desc "APP: twitter" :n "T" #'=twitter :desc "APP: twitter" :n "T" #'=twitter
:desc "APP: regex" :n "X" #'=regex :desc "APP: regex" :n "X" #'=regex
;; macos ;; macos
(:when IS-MAC (:when IS-MAC
@ -266,8 +264,8 @@
:desc "Invalidate cache" :n "x" #'projectile-invalidate-cache) :desc "Invalidate cache" :n "x" #'projectile-invalidate-cache)
(:desc "quit" :prefix "q" (:desc "quit" :prefix "q"
:desc "Quit" :n "q" #'evil-save-and-quit :desc "Quit" :n "q" #'evil-save-and-quit
:desc "Quit (forget session)" :n "Q" #'+workspace/kill-session-and-quit) :desc "Quit (forget session)" :n "Q" #'+workspace/kill-session-and-quit)
(:desc "remote" :prefix "r" (:desc "remote" :prefix "r"
:desc "Upload local" :n "u" #'+upload/local :desc "Upload local" :n "u" #'+upload/local
@ -278,10 +276,10 @@
:desc "Detect remote changes" :n ">" #'+upload/check-remote) :desc "Detect remote changes" :n ">" #'+upload/check-remote)
(:desc "snippets" :prefix "s" (:desc "snippets" :prefix "s"
:desc "New snippet" :n "n" #'yas-new-snippet :desc "New snippet" :n "n" #'yas-new-snippet
:desc "Insert snippet" :nv "i" #'yas-insert-snippet :desc "Insert snippet" :nv "i" #'yas-insert-snippet
:desc "Find snippet for mode" :n "s" #'yas-visit-snippet-file :desc "Find snippet for mode" :n "s" #'yas-visit-snippet-file
:desc "Find snippet" :n "S" #'+hlissner/find-in-snippets) :desc "Find snippet" :n "S" #'+hlissner/find-in-snippets)
(:desc "toggle" :prefix "t" (:desc "toggle" :prefix "t"
:desc "Flyspell" :n "s" #'flyspell-mode :desc "Flyspell" :n "s" #'flyspell-mode
@ -483,13 +481,12 @@
;; git-timemachine ;; git-timemachine
(:after git-timemachine (:after git-timemachine
(:map git-timemachine-mode-map (:map git-timemachine-mode-map
:nv "p" #'git-timemachine-show-previous-revision :n "C-p" #'git-timemachine-show-previous-revision
:nv "n" #'git-timemachine-show-next-revision :n "C-n" #'git-timemachine-show-next-revision
:nv "g" #'git-timemachine-show-nth-revision :n "[[" #'git-timemachine-show-previous-revision
:nv "q" #'git-timemachine-quit :n "]]" #'git-timemachine-show-next-revision
:nv "w" #'git-timemachine-kill-abbreviated-revision :n "q" #'git-timemachine-quit
:nv "W" #'git-timemachine-kill-revision :n "gb" #'git-timemachine-blame))
:nv "b" #'git-timemachine-blame))
;; gist ;; gist
(:after gist (:after gist

View file

@ -1,4 +1,5 @@
;;; private/hlissner/autoload/evil.el -*- lexical-binding: t; -*- ;;; private/hlissner/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+hlissner:multi-next-line "private/hlissner/autoload/evil" nil t) ;;;###autoload (autoload '+hlissner:multi-next-line "private/hlissner/autoload/evil" nil t)
(evil-define-motion +hlissner:multi-next-line (count) (evil-define-motion +hlissner:multi-next-line (count)

View file

@ -22,6 +22,7 @@ private/hlissner/snippets."
(defun ,(intern (format "+hlissner/find-in-%s" name)) () (defun ,(intern (format "+hlissner/find-in-%s" name)) ()
(interactive) (interactive)
(let ((default-directory ,dir) (let ((default-directory ,dir)
projectile-project-name
projectile-require-project-root projectile-require-project-root
projectile-cached-buffer-file-name projectile-cached-buffer-file-name
projectile-cached-project-root) projectile-cached-project-root)

View file

@ -1,4 +1,5 @@
;;; tools/eshell/autoload/evil.el -*- lexical-binding: t; -*- ;;; tools/eshell/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+eshell:run "tools/eshell/autoload/evil" nil t) ;;;###autoload (autoload '+eshell:run "tools/eshell/autoload/evil" nil t)
(evil-define-command +eshell:run (command bang) (evil-define-command +eshell:run (command bang)

View file

@ -10,7 +10,7 @@
(def-package! eshell ; built-in (def-package! eshell ; built-in
:commands eshell-mode :commands eshell-mode
:init :init
(setq eshell-directory-name (concat doom-cache-dir "/eshell") (setq eshell-directory-name (concat doom-etc-dir "/eshell")
eshell-scroll-to-bottom-on-input 'all eshell-scroll-to-bottom-on-input 'all
eshell-scroll-to-bottom-on-output 'all eshell-scroll-to-bottom-on-output 'all
eshell-buffer-shorthand t eshell-buffer-shorthand t

View file

@ -1,4 +1,5 @@
;;; tools/gist/autoload/evil.el -*- lexical-binding: t; -*- ;;; tools/gist/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+gist:send "tools/gist/autoload/evil" nil t) ;;;###autoload (autoload '+gist:send "tools/gist/autoload/evil" nil t)
(evil-define-operator +gist:send (bang) (evil-define-operator +gist:send (bang)

View file

@ -1,4 +1,5 @@
;;; tools/tmux/autoload/evil.el -*- lexical-binding: t; -*- ;;; tools/tmux/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+tmux:run "tools/tmux/autoload/evil" nil t) ;;;###autoload (autoload '+tmux:run "tools/tmux/autoload/evil" nil t)
(evil-define-command +tmux:run (bang &optional command) (evil-define-command +tmux:run (bang &optional command)

View file

@ -111,22 +111,22 @@ file-name => comint.el")
:group 'doom) :group 'doom)
(defface doom-modeline-buffer-path (defface doom-modeline-buffer-path
'((t (:inherit mode-line-emphasis :bold t))) '((t (:inherit (mode-line-emphasis bold))))
"Face used for the dirname part of the buffer path." "Face used for the dirname part of the buffer path."
:group '+doom-modeline) :group '+doom-modeline)
(defface doom-modeline-buffer-file (defface doom-modeline-buffer-file
'((t (:inherit mode-line-buffer-id))) '((t (:inherit (mode-line-buffer-id bold))))
"Face used for the filename part of the mode-line buffer path." "Face used for the filename part of the mode-line buffer path."
:group '+doom-modeline) :group '+doom-modeline)
(defface doom-modeline-buffer-modified (defface doom-modeline-buffer-modified
'((t (:inherit error :background nil :bold t))) '((t (:inherit (error bold) :background nil)))
"Face used for the 'unsaved' symbol in the mode-line." "Face used for the 'unsaved' symbol in the mode-line."
:group '+doom-modeline) :group '+doom-modeline)
(defface doom-modeline-buffer-major-mode (defface doom-modeline-buffer-major-mode
'((t (:inherit mode-line-emphasis :bold t))) '((t (:inherit (mode-line-emphasis bold))))
"Face used for the major-mode segment in the mode-line." "Face used for the major-mode segment in the mode-line."
:group '+doom-modeline) :group '+doom-modeline)
@ -142,17 +142,17 @@ file-name => comint.el")
:group '+doom-modeline) :group '+doom-modeline)
(defface doom-modeline-info (defface doom-modeline-info
`((t (:inherit success :bold t))) `((t (:inherit (success bold))))
"Face for info-level messages in the modeline. Used by `*vc'." "Face for info-level messages in the modeline. Used by `*vc'."
:group '+doom-modeline) :group '+doom-modeline)
(defface doom-modeline-warning (defface doom-modeline-warning
`((t (:inherit warning :bold t))) `((t (:inherit (warning bold))))
"Face for warnings in the modeline. Used by `*flycheck'" "Face for warnings in the modeline. Used by `*flycheck'"
:group '+doom-modeline) :group '+doom-modeline)
(defface doom-modeline-urgent (defface doom-modeline-urgent
`((t (:inherit error :bold t))) `((t (:inherit (error bold))))
"Face for errors in the modeline. Used by `*flycheck'" "Face for errors in the modeline. Used by `*flycheck'"
:group '+doom-modeline) :group '+doom-modeline)
@ -226,9 +226,7 @@ active."
(defun +doom-modeline--buffer-file-name-truncate (&optional truncate-tail) (defun +doom-modeline--buffer-file-name-truncate (&optional truncate-tail)
"Propertized `buffer-file-name' that truncates every dir along path. "Propertized `buffer-file-name' that truncates every dir along path.
If TRUNCATE-TAIL is t also truncate the parent directory of the file." If TRUNCATE-TAIL is t also truncate the parent directory of the file."
(let ((dirs (shrink-path-prompt (file-name-directory (let ((dirs (shrink-path-prompt (file-name-directory buffer-file-truename)))
(or buffer-file-truename
(file-truename buffer-file-name)))))
(active (active))) (active (active)))
(if (null dirs) (if (null dirs)
(propertize "%b" 'face (if active 'doom-modeline-buffer-file)) (propertize "%b" 'face (if active 'doom-modeline-buffer-file))
@ -251,13 +249,13 @@ If TRUNCATE-TAIL is t also truncate the parent directory of the file."
(if (null root) (if (null root)
(propertize "%b" 'face (if active 'doom-modeline-buffer-file)) (propertize "%b" 'face (if active 'doom-modeline-buffer-file))
(let* ((modified-faces (if (buffer-modified-p) 'doom-modeline-buffer-modified)) (let* ((modified-faces (if (buffer-modified-p) 'doom-modeline-buffer-modified))
(relative-dirs (file-relative-name (file-name-directory buffer-file-name) (relative-dirs (file-relative-name (file-name-directory buffer-file-truename)
(if include-project (concat root "../") root))) (if include-project (concat root "../") root)))
(relative-faces (or modified-faces (if active 'doom-modeline-buffer-path))) (relative-faces (or modified-faces (if active 'doom-modeline-buffer-path)))
(file-faces (or modified-faces (if active 'doom-modeline-buffer-file)))) (file-faces (or modified-faces (if active 'doom-modeline-buffer-file))))
(if (equal "./" relative-dirs) (setq relative-dirs "")) (if (equal "./" relative-dirs) (setq relative-dirs ""))
(concat (propertize relative-dirs 'face (if relative-faces `(:inherit ,relative-faces))) (concat (propertize relative-dirs 'face (if relative-faces `(:inherit ,relative-faces)))
(propertize (file-name-nondirectory buffer-file-name) (propertize (file-name-nondirectory buffer-file-truename)
'face (if file-faces `(:inherit ,file-faces)))))))) 'face (if file-faces `(:inherit ,file-faces))))))))
(defun +doom-modeline--buffer-file-name (truncate-project-root-parent) (defun +doom-modeline--buffer-file-name (truncate-project-root-parent)
@ -269,10 +267,8 @@ Example:
~/Projects/FOSS/emacs/lisp/comint.el => ~/P/F/emacs/lisp/comint.el" ~/Projects/FOSS/emacs/lisp/comint.el => ~/P/F/emacs/lisp/comint.el"
(let* ((project-root (doom-project-root)) (let* ((project-root (doom-project-root))
(file-name-split (shrink-path-file-mixed project-root (file-name-split (shrink-path-file-mixed project-root
(file-name-directory (file-name-directory buffer-file-truename)
(or buffer-file-truename buffer-file-truename))
(file-truename buffer-file-name)))
(file-truename buffer-file-name)))
(active (active))) (active (active)))
(if (null file-name-split) (if (null file-name-split)
(propertize "%b" 'face (if active 'doom-modeline-buffer-file)) (propertize "%b" 'face (if active 'doom-modeline-buffer-file))
@ -291,7 +287,7 @@ Example:
(abbreviate-file-name project-root)) (abbreviate-file-name project-root))
'face sp-props) 'face sp-props)
(propertize (concat project "/") 'face project-props) (propertize (concat project "/") 'face project-props)
(when relative-path (propertize relative-path 'face relative-props)) (if relative-path (propertize relative-path 'face relative-props))
(propertize filename 'face file-props))))))))) (propertize filename 'face file-props)))))))))

View file

@ -1,10 +1,5 @@
;;; ui/doom/config.el -*- lexical-binding: t; -*- ;;; ui/doom/config.el -*- lexical-binding: t; -*-
(set! :font "Fira Mono" :size 12)
(set! :big-font "Fira Mono" :size 18)
(set! :variable-font "Fira Sans" :size 12)
(set! :unicode-font "DejaVu Sans Mono" :size 12)
;; <https://github.com/hlissner/emacs-doom-theme> ;; <https://github.com/hlissner/emacs-doom-theme>
(def-package! doom-themes (def-package! doom-themes
:demand t :demand t

View file

@ -1,10 +1,19 @@
;;; ui/unicode/config.el -*- lexical-binding: t; -*- ;;; ui/unicode/config.el -*- lexical-binding: t; -*-
(def-package! unicode-fonts (def-package! unicode-fonts
:demand t
:init :init
(setq-default bidi-display-reordering t (setq-default bidi-display-reordering t
doom-unicode-font nil) doom-unicode-font nil)
:config
;; NOTE will impact startup time on first run (defun +unicode|init-fonts (&optional frame)
(unicode-fonts-setup)) "Initialize `unicode-fonts', if in a GUI session."
(when (display-graphic-p frame)
(with-selected-frame frame
(require 'unicode-fonts)
;; NOTE will impact startup time on first run
(unicode-fonts-setup))))
(add-hook! 'after-init-hook
(if initial-window-system
(+unicode|init-fonts)
(add-hook 'after-make-frame-functions #'+unicode|init-fonts))))