Commit Graph

9629 Commits

Author SHA1 Message Date
Henrik Lissner
3306eaa17c
core-lib: refactor defer-until!, add-transient-hook!
Now uses an interned hook name (that could be removed, unlike the
uninterned symbol make-symbol creates).

Also, for consistency: fun -> fn

No fun allowed!
2019-07-22 02:30:39 +02:00
Henrik Lissner
b742bf086f
core-lib: add prependq! and appendq! macros 2019-07-22 02:30:39 +02:00
Henrik Lissner
0f98b5b3c2
core-lib: use projectile cache in file-exists-p!
If available.
2019-07-22 02:30:39 +02:00
Henrik Lissner
f05aa3a0b1
core-lib: add unsetq-hook! #1568 2019-07-22 02:30:39 +02:00
Henrik Lissner
987061aedd
Rewrite autoload/message.el & move to format.el
Adds new convenience macros like print! and insert!, and adds classes;
which are helper functions that can be called inline within format!,
print! et co, e.g.

  (format! "%s" (filename "/tmp/some/file")) ; => file
  (format! "%s" (relpath "/tmp/some/file" "/tmp")) ; => some/file
  (format! "%s" (dirname "/tmp/some/file")) ; => /tmp/some

Check out doom-format-class-alist for more.
2019-07-22 02:30:39 +02:00
Henrik Lissner
99e23adec1
ui/doom: simplify solaire init 2019-07-22 02:30:38 +02:00
Henrik Lissner
8c41093fae
ui/doom: update doom-themes config for treemacs/neotree 2019-07-22 02:30:38 +02:00
Henrik Lissner
2df56b93a9
Add so-long package
This package kicks in if you open a file whose lines are too long.

It is built into Emacs 27+, but I've backported it for earlier users.
2019-07-22 02:30:38 +02:00
Henrik Lissner
fdcb259bcd
Major refactor of Doom core files
- Remove core-os and move many of its settings out to other core
  libraries, where they belong
- Significantly improve commenting & compartmentalization of many
  settings
- Correct some mis-named public hooks (that were named as if they were
  private)
- Move the vast majority of optimizations to "Optimizations" section in
  core.el
- Don't activate xclip-mode or osx-clipboard-mode if we're accessing
  Emacs through an SSH connection (does more bad than good there)
- Add fast-but-imprecise-scrolling = t
- Set bidi-display-reordering = 'left-to-right, at the recommendation of
  an Emacs dev. Apparently setting it to nil is undefined, as Emacs is
  designed to always assume it's set; setting it explicitly to
  left-to-right will still do what was originally intended by turning it
  off: to reduce line/text scans for bidirectional text, which gives us
  a moderate boost in general runtime snappiness
- Set inhibit-compacting-fon-caches = t on windows (where it struggles
  especially with icon fonts)
- Disables "literal" mode for very large files (because I will be
  backporting so-long.el from Emacs 27 in the next commit)
2019-07-22 02:30:38 +02:00
Henrik Lissner
81ab3dbc5d
Simplify and decouple init files
The two doom-gc-* variables in init.el couples the rest of the config to
these two files. The bulk of GC/file-handler optimization was moved into
core.el and simplified (all that idle-timer voodoo was overkill).

Also adds (setq frame-inhibit-implied-reize t) to early-init, which
speeds up startup a fair bit in some edge cases with larger fonts.

squash! Simplify and decouple init files
2019-07-22 02:30:38 +02:00
Henrik Lissner
8147bc1aee
💥 lang/org: conform to new name conventions 2019-07-22 02:30:38 +02:00
Henrik Lissner
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
51d3b1b424
💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
Henrik Lissner
e3a102d05a
core-lib: minor reformatting 2019-07-20 11:40:03 +02:00
Henrik Lissner
c0530202a5
lang/org: restore attach entry in org-link-abbrev-alist 2019-07-20 11:40:03 +02:00
Henrik Lissner
2caaec50e8
Remove cond!
Well, that was short lived, but pcase and pcase-let are superior and
already available.
2019-07-20 11:40:03 +02:00
Henrik Lissner
553cd8db09
Deprecate Makefile for managing Doom
Use bin/doom instead
2019-07-20 11:40:03 +02:00
Henrik Lissner
c3354e2620
cli: disable patch-macos (only --undo/-u works)
This has been deprecated for a while. I will remove it entirely with the 2.1
release, but for now, you can no longer patch your app bundle with this.

Use 'doom env refresh' instead.
2019-07-20 11:40:00 +02:00
Henrik Lissner
8b27d19e0b
Fix "err=[-50]" gnutls error
When updating/installing packages.
2019-07-20 11:05:52 +02:00
Henrik Lissner
ba71d95066
emacs/vc: add git-timemachine-show-commit fix
See https://gitlab.com/pidu/git-timemachine/issues/77
2019-07-18 13:13:31 +02:00
Henrik Lissner
345d09d393
lang/emacs-lisp: don't fontify function in quoted list 2019-07-18 13:13:31 +02:00
Henrik Lissner
24b40824ce
Add doom-{visible,buried}-buffer-p predicates 2019-07-18 13:13:31 +02:00
Henrik Lissner
0625bf87d6
Add a nxml-mode file template 2019-07-18 03:41:47 +02:00
Henrik Lissner
103612a347
Add cond! macro to core-lib
An anaphoric cond.
2019-07-18 01:20:55 +02:00
Henrik Lissner
854d8ce00a
Fix (null uniquify-buffer-name-style) errors from ivy
Errors out in Emacs 25.x
2019-07-17 16:14:38 +02:00
Henrik Lissner
92aab23ca0
Merge pull request #1570 from seanfarley/fix-ansible
ansible: fix upstream changing function names
2019-07-17 02:38:29 +02:00
Sean Farley
d88085068d ansible: fix upstream changing coding conventions
Pull request here: https://github.com/k1LoW/emacs-ansible/pull/31
2019-07-16 17:28:25 -07:00
Henrik Lissner
84d43643c9
Fix "Bad request" failures during package-refresh
Particular with elpa.gnu.org. This is caused by a known error in Emacs
26.x, which has been fixed in 27, and documented here:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341
2019-07-15 01:00:49 +02:00
Henrik Lissner
d12e7b831f
editor/snippets: load doom-snippets sooner
We want +snippets-dir to be first in yas-snippet-dirs. To ensure this,
doom-snippets should be loaded immediately before it is added to it, if
possible.
2019-07-14 22:47:15 +02:00
Henrik Lissner
2ff762b397
Fix fd/rtags on debian/ubuntu
On debian/ubuntu, these executables have a different name:

- fd -> fdfind
- rc -> rtags-rc
- rdm -> rtags-rdm
2019-07-14 22:04:50 +02:00
Henrik Lissner
3313058c76
Make doom-adjust-font-size non-interactive
As it was intended.
2019-07-14 20:44:16 +02:00
Henrik Lissner
5c4b6b6423
Spice up README 2019-07-14 18:57:05 +02:00
Henrik Lissner
62af55dad0
Move emacs-snippets -> doom-snippets
The repo was renamed upstream.
2019-07-14 17:05:48 +02:00
Henrik Lissner
de85f67b7c
lang/org: remove redundant attach: link abbreviation 2019-07-14 05:35:51 +02:00
Henrik Lissner
43a82c7e92
non-evil users: C-c C-S-z = open repl in same window 2019-07-14 05:34:28 +02:00
Henrik Lissner
6153af9594
lang/markdown: only warn if all compilers are unavailable
Rather than check each individual module.
2019-07-14 00:24:09 +02:00
Henrik Lissner
7900d8a10e
bin/doom-doctor: fix void-variable it error 2019-07-13 23:39:31 +02:00
Henrik Lissner
0b28480a21
Remap xref-pop-marker-stack -> better-jumper
Better to have only one jumplist system.

Also remaps xref-find-* commands to +lookup commands earlier in the
startup process.
2019-07-13 15:47:19 +02:00
Henrik Lissner
57a5137b4b
Remove melpa mirror
It's fairly outdated (7 months) and only adds time to refresh process.
Need to find better mirrors or switch to straight soon.
2019-07-13 13:58:53 +02:00
Henrik Lissner
a0c6480833
Make discord+release badges larger #373 2019-07-13 13:50:52 +02:00
Henrik Lissner
c54509f99c
lang/rest: add basic imenu support 2019-07-13 13:00:26 +02:00
Henrik Lissner
4ebd3fad7f
Add :term shell module 2019-07-13 13:00:24 +02:00
Henrik Lissner
b57dccf825
ui/tabbar: remove buffer-order function reference
centaur-tabs-adjust-buffer-order-function and
centaur-tabs-adjust-buffer-order were removed upstream
2019-07-13 12:03:13 +02:00
Henrik Lissner
e81cdc0523
lang/org: prioritize checkboxes lower in dwim command
Otherwise, checkboxes take priority over links, clocks or tables.
2019-07-13 02:24:11 +02:00
Henrik Lissner
05eb333a0c
editor/snippets: expand on snippet commands & keybinds
- Introduces the +snippets/new (SPC s n) command for creating a new
  private snippet
- Introduces the +snippets/new-lias (SPC s N) command for creating a new
  private snippet alias, which will invoke another snippet (you will be
  prompted to select one). This will only work with the emacs-snippets
  library bundled with Doom Emacs, however, as it depends on its API.
- Introduces +snippets/edit (SPC s c) for modifying existing snippets.
  How this differs from yas-visit-snippet-file is it will copy the
  contents of built-in snippets into a buffer primed for your private
  snippets (in DOOMDIR/snippets), while yas-visit-snippet-file will
  simply open the originating snippet.
- Introduces the +snippets/find (SPC s ?),
  +snippets/find-for-current-mode (SPC s /) and
  +snippets/find-private (SPC s f) commands for, respectively, finding a
  snippet file among *all* directories in yas-snippet-dirs, finding a
  snippet for the current major mode (plus parents), and finding a
  snippet from among your private library. This opens built-in snippets
  in read-only mode, but you can press C-c C-e to open it in
  +snippets/edit.
2019-07-12 20:41:50 +02:00
Henrik Lissner
f90c0b8040
Add <escape> to blacklisted evil-collection keys
evil-collection is overzealous about its role in aborting things. We
already have our own doom-escape mechanism.
2019-07-12 18:25:28 +02:00
Henrik Lissner
17d7130804
Fix #1558: remember position on C-a/C-e
When the cursor is between the swap points.
2019-07-12 18:19:28 +02:00
Henrik Lissner
92ca6762ac
ui/tabbar: rewrite to use centaur-tabs
Plus some modifications to make tabs truly window-local, like they are
in any tabbed modern editor.
2019-07-12 17:40:48 +02:00
Henrik Lissner
e6540b419b
doom/set-indent-width: set standard-indent buffer-locally 2019-07-12 16:55:36 +02:00
Henrik Lissner
fddef812ec
tools/editorconfig: refactor how we ignore lisp modes 2019-07-12 16:47:49 +02:00