Commit Graph

497 Commits

Author SHA1 Message Date
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
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
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
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
fddef812ec tools/editorconfig: refactor how we ignore lisp modes 2019-07-12 16:47:49 +02:00
2c140496e8 tools/magit: popup transient below magit window
And tell popup manager to ignore transient popups.

Should affect #1539
2019-07-10 19:29:45 +02:00
9733db65d2 tools/direnv: fontify direnv stdlib keywords 2019-07-10 02:29:13 +02:00
b6a469f13d tools/direnv: update direnv on frame switch 2019-07-10 02:28:52 +02:00
69ba8bb657 Fix +debugger/start for dap-mode
And fix variable name typo.
2019-07-09 21:33:02 +02:00
95a6a2baaf tools/debugger: add lldb & gdb dap debuggers
And refactors/reformats how dap modules are loaded.
2019-07-09 21:32:09 +02:00
21d1844c6f tools/debugger: fix broken variable reference 2019-07-09 21:11:27 +02:00
cc3a793407 Add rust docs to online lookup providers
If :lang rust is enabled.
2019-07-09 17:55:35 +02:00
ef8cd55234 tools/direnv: fix direnv+flycheck integration
Also fixes direnv+flycheck for nix users by consulting direnv before
looking for flycheck executables.
2019-07-09 16:11:36 +02:00
17bd6e43c6 tools/direnv: consult direnv less frequently
By checking on doom-switch-{buffer,window}-hook and focus-in-hook, which
fires a lot less often than post-command-hook.
2019-07-08 21:23:49 +02:00
096a3b96cc Update & refactor tools/debugger
- Polish dap-mode support
- Fix realgud autoloads
- Add +debugger/start and +debugger/quit
- Move dap-breakpoints file into doom-etc-dir
- Fix SPC o d
- Add popup rule for realgud:pdb debugger
- Update display-in-popup advice to reflect changes upstream
- Realgud command buffer is auto-killed (and popup closed) when quitting
  the debugger.
- (evil users) Add :debug ex command
2019-07-07 22:01:24 +02:00
63412af9c3 tools/debugger: add node >=v8 support to realgud 2019-07-07 13:12:06 +02:00
70ac4c0cf5 tools/debugger: add rudimentary dap-mode support 2019-07-06 23:22:27 +02:00
5cabbef6ef tools/lsp: fix company-lsp not being enabled
Due to a load-order issue between company and lsp.
2019-07-05 23:42:06 +02:00
eb42f95777 tools/lsp: noop lsp! if used more than once 2019-07-05 19:08:11 +02:00
6973a8926d tools/lookup: remove duplicate code & minor fixes
- Removes vestigial definition of +lookup/in-docsets, which would throw
  an error.
- Fixes the universal argument for this function.
- Fix multiple set-docsets! calls prepending rather than setting
  dash-docs-docsets.
- Logs search attempts for debugging purposes.
2019-07-05 16:50:03 +02:00
7df4e252fd tools/lsp: refactor out dash 2019-06-30 13:20:46 +02:00
108c7ba5ad Fix 'selected killed buffer' error on +magit/quit 2019-06-30 13:20:07 +02:00
8de5e98905 tools/lsp: fix #1524 2019-06-30 12:16:03 +02:00
2f268e80bb tools/lsp: fall back to lsp-find-{definitions,references} #1521
When lsp-ui-mode is disabled.
2019-06-29 01:36:24 +02:00
a9ca62070c tools/lsp: reduce lsp's self-configuring eagerness
The original `lsp' initializes too much, too quickly. Things like
flycheck, company, and yasnippet. Doom's modules already handle these
just fine, so we advice it to leave it to us to handle. I intentionally
avoid disabling lsp-auto-configure because doing so is much more
destructive than I'd like.

This update prevents lsp-ui-mode from being auto-enabled on lsp-mode.
You can now (remove-hook 'lsp-mode-hook #'lsp-ui-mode) to disable
lsp-ui.

This update also adds these two hooks:

+ +lsp|init-company (on `lsp-mode-hook')
+ +lsp|init-ui-flycheck-or-flymake (on `lsp-ui-mode-hook')
2019-06-29 01:36:24 +02:00
380c3ac268 Disable lookup handlers if minor mode is disabled 2019-06-29 00:23:13 +02:00
9a02bd8ac8 Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
44a5ffad66 tools/flyspell: doom-log failed to find checker
Instead of logging with message, which is more disruptive (appears in
bin/doom output, for instance).
2019-06-18 17:30:26 +02:00
2e394fac6a Remove +flycheck-on-escape; add +flycheck-lazy-idle-delay
+flycheck-on-escape was redundant with removing +flycheck|buffer from
doom-escape-hook. Also, I don't use this pattern anywhere else.
2019-06-14 18:38:19 +02:00
6b6ea699f4 tools/pass: use latest version of auth-source-pass
The upstream version is several major versions (v5.0) ahead of the
built-in one (v2.0).
2019-06-11 08:07:25 +02:00
5683ffe0d2 Fix +lookup/file in non-project files
file-in-directory-p threw wrong-type-argument stringp errors because
project-root was nil.
2019-06-10 09:38:57 +02:00
ada5990f88 tools/flyspell: demote missing program warning
Log the missing dependency rather than a disruptive pop up.
2019-06-10 09:38:56 +02:00
c4b325fa4b Fix magit-clone error
magit-clone function has changed signature to work with transient.
So using the new magit-clone-regular instead.

Signed-off-by: Huy Duong <huy.duong@employmenthero.com>
2019-06-03 16:59:03 +07:00
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
ef9f5b3bdf Merge pull request #1201 from kot-behemoth/patch-1
Document +ein-hydra
2019-05-30 13:23:17 -04:00
9ad8d97f93 Correct map! example 2019-05-30 13:21:19 -04:00
66b74c63b7 magit-todos 1.2 removed magit-todos-require-colon
3c59aa03b2 (12)
2019-05-30 16:33:37 +02:00
2214c3175e Minor tweaks across the board 2019-05-21 00:34:32 -04:00
10cef7a887 tools/flyspell: add +prog flag #1418
Enables flyspell-prog-mode on prog-mode-hook.
2019-05-19 02:18:25 -04:00
c3cb7c5000 :tools password-store -> :tools pass
A simpler name and matches the prefix of its module.
2019-05-19 02:18:25 -04:00
8c65a63b1c Move eshell, term & vterm modules to :term 2019-05-19 02:17:59 -04:00
42ba2a22b8 Prevent ~/.emacs.d/transient from being created 2019-05-19 02:17:59 -04:00
571e7bd527 Fix +lookup/in-docsets & docsets lookup backend
They were throwing 'cannot find docset' errors.

- Adds new +lookup/in-all-docsets command.
- If a prefix arg is passed to +lookup/in-docsets, it will search all
  docsets in dash-docs-common-docsets.
2019-05-17 21:02:24 -04:00
31ed6fdf2b tools/eval: fix eval-and-replace not first clearing selection 2019-05-17 16:01:46 -04:00
ec240d0bfa tools/eval: fix window-live-p error on eval-and-replace
Caused because the quickrun window adjustment hooks assume quickrun will
always spawn a results buffer, but in the case of eval-and-replace, it
doesn't.
2019-05-17 15:59:49 -04:00
87899124ab Disable lsp-ui-doc by default
In the interest of performance and simplicity. lsp-ui-doc is redundant
with +lookup/documentation and eldoc (which are less imposing than
lsp-ui-doc's childframe).

Also sets lsp-groovy-server-install-dir.
2019-05-17 02:05:33 -04:00
3240238a18 tools/vterm: improve UI/UX
- Don't prompt about processes when killing buffer
- Hide modeline in vterm buffers (doesn't do anything useful and would
  be consistent with settings for eshell and term modules).
- Refactor +vterm/open & +vterm/open-popup
- Add Emacs window redraw hack to force vterm to redraw, fixing
  artefacting in some edge cases.
- Fix ansi-color-names-vector when solaire-mode is present, otherwise
  you get a mismatched background in vterm (and other terms).
2019-05-17 01:58:42 -04:00
ae8aa26c33 tools/lookup: add prefix arg to lookup commands
The prefix arg causes +lookup/{definition,references,documentation} to
prompt you for which lookup backend to use.
2019-05-16 00:37:27 -04:00
1f88efeb82 tools/lookup: fix missing +lookup-symbol-or-region error 2019-05-16 00:10:56 -04:00
4002313e79 tools/lookup: declare gnutls-algorithm-priority early
Otherwise, gnutls-algorithm-priority won't be in scope for
`dash-docs-read-json-from-url`.
2019-05-15 23:59:03 -04:00