Commit Graph

1070 Commits

Author SHA1 Message Date
Henrik Lissner
9b4fd806bb
Simplify doom/info output 2020-10-20 23:21:11 -04:00
Henrik Lissner
35185b2175
Split doom-reload-hook into before/after hooks 2020-10-16 22:28:08 -04:00
Henrik Lissner
b6fe731153
Fix #4103: respect delete-by-moving-to-trash
When calling doom/delete-this-file
2020-10-15 23:12:21 -04:00
Henrik Lissner
db07304c71
Don't enable explain-pause-mode at startup
When starting Emacs in debug mode, explain-pause-mode is enabled. This
pulls in other packages with it, which can taint results when testing
package load order. Also, explain-pause-mode is for measuring pauses
during interactive use, it isn't very useful for startup benchmarking.

So we only toggle it if doom-debug-mode is toggled interactively.
2020-10-11 16:41:07 -04:00
Rudi Grinberg
b52072ec90 Search compressed .el files in load history
On many installations, the .el files that are builtin to emacs are
compressed. We should search these as well.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2020-10-09 15:22:04 -07:00
Henrik Lissner
b29b865d30
Fix #3975: configure native-comp in sandbox 2020-10-06 02:08:17 -04:00
Henrik Lissner
3cb7458d34
Fix #4033: correctly toggle explain-pause-mode
On doom-debug-mode.
2020-10-05 23:02:36 -04:00
Henrik Lissner
1aa48ce822
Fix #4029: remove project.el support project cmds
project.el doesn't seem to handle symlinks well.
2020-10-05 16:21:50 -04:00
Henrik Lissner
ae3a2fa8c2
doom-info: use &nopath prefix for 404'd modules
The alternative is a stringp error.
2020-09-02 14:23:11 -04:00
Henrik Lissner
60ba42ca4a
Fix #3873: use thing-at-point for nox & elpy 2020-08-31 23:11:33 -04:00
Henrik Lissner
406c651059
Increase search depth for doom/help-search-headings 2020-08-31 14:53:42 -04:00
Henrik Lissner
2bd921e15d
Merge pull request #3850 from thiagokokada/cleanup-help-el
core: Cleanup core/autoload/help.el
2020-08-27 01:15:51 -04:00
Thiago Kenji Okada
0111e26373 core: Cleanup core/autoload/help.el
Removing references after e24b8cd1d1.
2020-08-26 21:27:25 -03:00
Henrik Lissner
b3006ecabb
ui/modeline: update buffer id when renaming files
And revert 247ce145b, since I wasn't aware
after-set-visited-file-name-hook existed.
2020-08-26 19:54:05 -04:00
Henrik Lissner
247ce145b4
Revert buffer after renaming file 2020-08-26 19:52:06 -04:00
Henrik Lissner
e00560caf8
Fix #3827 (part 2): inverted file cookies
Turns out some autodefs weren't being noop'ed when their file's cookie
returns nil. This was the secondary cause of #3827.
2020-08-26 19:51:46 -04:00
Henrik Lissner
5c6189fb4e
Simplify doom/version output
Only really needs to output Doom's version and build info.
2020-08-24 23:00:32 -04:00
Henrik Lissner
e632871a11
core-cli: backport more refactors from rewrite
Still a long way to go, but this introduces a few niceties for
debugging CLI failures:

+ The (extended) output of the last bin/doom command is now logged to
  ~/.emacs.d/.local/doom.log
+ If an error occurs, short backtraces are displayed whether or not you
  have debug mode on. The full backtrace is written to
  ~/.emacs.d/.local/doom.error.log.
+ bin/doom now aborts with a warning if:
  - The script itself or its parent directory is a symlink. It's fine if
    ~/.emacs.d is symlinked though.
  - Running bin/doom as root when your DOOMDIR isn't in /root/.
  - If you're sporting Emacs 26.1 (now handled in the elisp side rather
    than the /bin/sh shebang preamble).
+ If a 'doom sync' was aborted prematurely, you'll be warned that Doom
  was left in an inconsistent state and that you must run `doom sync`
  again.

May address #3746
2020-08-24 23:00:32 -04:00
Henrik Lissner
7e362e8fbd
Redesign doom/info
+ Replace "daemonp" and "windowsys" fields with "traits" field, which
  can now indicate the presence of: Chemacs, exec-path-from-shell,
  symlinked EMACSDIR/DOOMDIR, a running server, the daemon and an envvar
  file.
+ Now replaces $USER in absolute paths with literal "$USER".
+ Reordered fields from most to least general (system -> emacs -> doom)
+ Show "&user" next to modules that are private modules (defined in
  ~/.doom.d/modules/)
2020-08-24 22:27:40 -04:00
Henrik Lissner
4e82ee4397
Refactor doom-debug-mode
+ Add explain-pause-mode
+ Now reloads itself if doom-debug-variables is changed or when one of
  its variables becomes available.
+ doom-debug-variables now supports a cons cell entry where its CAR is
  the name of the variable and CDR is the value it should be set to when
  doom-debug-mode is active.
2020-08-21 01:26:24 -04:00
Henrik Lissner
702fb6e95d
Fix #3747: make enlargen/maximize workspace-aware
Otherwise, doom/enlargen-window and doom/window-maximize-buffer could
restore the window configuration of other workspaces.
2020-08-14 02:13:37 -04:00
Henrik Lissner
73c95bb1ad
Optimize doom-visible-buffers 2020-08-13 22:49:35 -04:00
Henrik Lissner
7bec0e3518
Fix doom/help-search-load-path & doom/help-search-loaded-files
When counsel-rg-base-command is a string, instead of a list.
2020-08-07 18:56:57 -04:00
Henrik Lissner
b5706c5793
Fix inverted on/off message from doom-debug-mode 2020-08-06 00:22:40 -04:00
Henrik Lissner
6f2471cda7
Bind ZX -> Save then kill current buffer
Since bury-buffer is already on SPC b z, and isn't a common operation in
day to day Emacs use.

Other useful keybinds:
  ZZ      -> Save then kill current window
  zx      -> kill current buffer (prompts if unsaved)
  SPC b z -> bury buffer
  zn      -> (operator) narrow buffer
  zN      -> widen narrowed buffer
2020-08-05 20:58:29 -04:00
Henrik Lissner
68507e1eac
Load straight in doom/bump* commands
Prevents errors about missing straight functions/variables.
2020-08-01 15:20:32 -04:00
Henrik Lissner
da1030985d
Minor refactors & reformatting 2020-07-23 01:26:03 -04:00
Henrik Lissner
cf39d7ed59
Fix #3532: file API wouldn't work with TRAMP 2020-07-13 17:14:12 -04:00
Henrik Lissner
46d6d0b586
Use symbol-at-point instead of xref w/ eglot
Otherwise doom-thing-at-point-or-region will return nil, causing
"Nothing under point" warnings when using lookup commands.
2020-06-29 15:12:30 -04:00
Henrik Lissner
aeba2116c7
Fix #3401: doom/help-search returning no results 2020-06-19 15:50:13 -04:00
Gerry Agbobada
32f9070614
Filter out 'eglot backend from doom-thing-at-point
Context : https://github.com/joaotavora/eglot/issues/503

Fixes a bug where having eglot enabled in a buffer will make `SPC *` search the whole project for literally `LSP Identifier at point.`
2020-06-18 23:59:33 +02:00
Henrik Lissner
912961b46d
Merge pull request #3258 from sei40kr/tslint-and-eslint-for-tsx
lang/javascript: Enable TSLint and ESLint for TypeScript-TSX
2020-06-07 14:19:13 -04:00
Henrik Lissner
5092bd82f9
Fix doom/help-search-{load-path,loaded-files}
counsel-rg-base-command now accepts a list.

Closes #3323
2020-06-07 13:55:23 -04:00
Henrik Lissner
0f03c32a12
Add with-output-to! macro
For piping output to both stdout and a file/buffer. Used in the coming
CLI rewrite.
2020-06-05 15:18:03 -04:00
Marcus Ramberg
35ec72d080 Rename perl module to raku.
It doesn't actually contain any Perl config.
2020-06-05 21:01:23 +02:00
Henrik Lissner
8bf902d5f4
General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
Seong Yong-ju
63113ff6ce lang/javascript: Enable TSLint and ESLint for TypeScript-TSX 2020-05-31 00:57:38 +09:00
Henrik Lissner
95eb2989dc
Minimize custom-set-faces! clobbering doom-load-theme-hook
Evaluating custom-set-faces! calls would add setter functions to
doom-load-theme-hook indefinitely, which could add up each time you M-x
doom/reload. Now it adds them to a subhook, which is reset whenever Doom
is reloaded.
2020-05-28 22:01:23 -04:00
Henrik Lissner
a9bf0b8985
Add cmd!, cmd!!, cmds! convenience macros
It's kind of silly that our command lambda macros (λ! and λ!!) need a
snippet, special key sequence or copy-paste to insert, so in the spirit
of fn! -- and to make sure they take up less space than `lambda!` --
I've added `cmd!` and `cmd!!` aliases. `lambda!` and `lambda!!` are now
deprecated. λ! and λ!! will remain.

I've also added `cmds!` as a convenience wrapper around
general-predicate-dispatch.
2020-05-27 18:29:35 -04:00
Henrik Lissner
77a4e8f8a7
Fix switch-project completion defaulting to current project
Affects doom/browse-in-other-project, doom/find-file-in-other-project,
+default/search-other-project and
+default/search-project-for-symbol-at-point.

When performing a text or file search in "another project", prior to
this update the current project would be the first highlighted
candidate, which doesn't make much sense when you're invoking a command
for searching *other* projects.
2020-05-26 14:06:19 -04:00
Henrik Lissner
3253ca8435
Minor refactors & comment/message revision 2020-05-25 22:11:15 -04:00
Henrik Lissner
d1fcbf244b
doom/toggle-debug-mode -> doom-debug-mode 2020-05-25 20:18:36 -04:00
Henrik Lissner
e6c88e4384
Refactor autoloads generator & reduce to one generated file
We no longer need two separate autoloads files, so I merged them and
optimized its generation logic.

Other changes
- Doom will refuse to start up (with a helpful error) if it's in an
  incomplete state. This should hopefully reduce the number of bug
  reports from folks that have done something weird, e.g.
  1. You've changed Emacs versions without running 'doom sync -b'.
  2. You've updated Doom outside of `doom upgrade` and didn't run `doom
     sync -u`.
  3. You've forgotten to run 'doom sync' in the first place!
  4. If a previous 'doom ...' command was aborted midway without running
     'doom sync' afterwards.
- 'doom sync' will emit reminders that you need to reload/restart Emacs
- Autoloads API now uses the `doom-autoloads-` prefix, intead of
  'doom-cli-autoloads-', as will be the new convention in the coming
  rewrite.
- Errors from within the package autoloads should be easier to invoke
  the debugger on.
- `doom-modules` is now stored in your autoloads file. Your module list
  will soon be frozen between calls to 'doom sync' to allow for our new,
  atomic CLI I'm working on. This will also means the `doom!` block
  won't cost anything in interactive sessions.
2020-05-25 15:55:29 -04:00
Henrik Lissner
be889d09e8
Rename doom-format lib -> doom-output
`format` isn't an appropriate for this library, considering it (and
future additions to it) will be mainly concerned with printing or
capturing output.
2020-05-25 15:55:29 -04:00
Henrik Lissner
cc5f498586
Add magic cli.el in modules & refactor module init
Doom now looks for cli.el files in your private directory or modules,
giving them an opportunity to customize the CLI (add commands or
reconfigure existing ones) to suit their purposes.
2020-05-25 15:55:28 -04:00
Henrik Lissner
3a38fc633c
Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00
Henrik Lissner
09c6e99e23
Fix 'Cannot get this file-path' when bumping in babel edit buffers
Break glass in case of literate configs.
2020-05-25 01:19:03 -04:00
Henrik Lissner
196490c772
Improve UX & output of doom/bump-* commands 2020-05-20 15:33:55 -04:00
Henrik Lissner
f0e6ede81b
Relax how strict doom/bump-package-at-point is about point
This command would formerly work only if the point was on the opening
parenthesis, and sometimes insert the :pin in odd places. It is now much
more relaxed.
2020-05-19 22:00:20 -04:00
Henrik Lissner
df0bca6579
Fix doom/bump-module for :private packages 2020-05-19 19:11:02 -04:00