Commit graph

122 commits

Author SHA1 Message Date
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Itai Y. Efrat
0e6682612f feat(default): use consult-flycheck when applicable 2022-08-12 21:01:56 +02:00
Daanturo
08dac1400f fix(default): +default/yank-buffer-path echos the file name as nil
Emacs 29 with PGTK's kill-new doesn't return its STRING argument (with
the default settings) anymore, so we explicitly pass the file path to
prevent the confusing message "Copied path to clipboard: nil".
2022-08-03 19:26:19 +02:00
Daanturo
b5fd085af0 tweak(default): consult-flymake in a branch of +default-diagnostics
when available instead of plain flymake-show-diagnostics-buffer
2022-07-23 16:36:01 +02:00
Henrik Lissner
442d607ec0
fix: remove outdated uses of user-emacs-directory
Doom changes user-emacs-directory (see 46844b5 for explanation), so
doom-emacs-dir should be used to refer to your $EMACSDIR instead.

Fix: #6530
Ref: 46844b55de
2022-07-04 02:58:11 +02:00
Henrik Lissner
7ca50e0ce8
feat(default): bind 'SPC b y' to yank whole buffer
Evil may not always be available in all buffers, and in line with the
filepath yank commands on SPC f y/Y, I thought this command could be
useful. However, I omitted a "replace buffer with paste" command because
in any editing context, evil should be available, in which case it'd be
redundant with `vigp` (or yig for yanking the buffer).

Close: #5281
Co-authored-by: Alex Palaistras <deuill@users.noreply.github.com>
2022-06-21 18:46:25 +02:00
Henrik Lissner
009613a470 refactor(default,lib): doom--org-headings 2022-02-10 21:07:20 +01:00
Ethan Leba
6e0b2eafa6 fix(default): only use woman on macOS
`man -k "^"` is very slow on macOS.

```
sh-3.2$ time man -k "^" > /dev/null

real	0m1.599s
user	0m0.391s
sys	0m1.209s
```
2021-12-14 20:51:34 -05:00
Henrik Lissner
f0ba6c99b2 fix(default): search symbol at point from project root
...Rather than current directory.

While +default/search-project-for-symbol-at-point should operate out of
the current project's root, +default/search-notes-for-symbol-at-point
must operate out of org-directory, and no where else, even if
org-directory is not a valid project. 411ed0c8f8 was written to fix
that, but it indirectly broke
'+default/search-project-for-symbol-at-point' (causing it to always
resolve to the current directory, rather than the current project's
root).

Amend: 411ed0c8f8
Fix: #5831
2021-11-25 17:05:42 +01:00
Henrik Lissner
411ed0c8f8 fix(default): search commands not respecting default-directory
Commands that delegate to `+default/search-project-for-symbol-at-point`
to search a directory (like +default/org-notes-search) would not scope
searches to default-directory.
2021-11-20 00:02:11 +01:00
Seong Yong-ju
a7d30f6853
fix: +default/discover-projects not reading depth
Fix: #5736
Fix: #5735
2021-11-18 19:15:56 +01:00
Itai Y. Efrat
74aae48944 feat(default): add .emacs.d search on <leader> s e 2021-09-23 11:40:04 +02:00
Daanturo
e19a6523ae feat(default): may include project name for SPC f Y
+default/yank-buffer-path-relative-to-project: with non-nil prefix arg,
copy the file name relative to the project root's parent.

Sometimes we also want to specify the project name to let others know
which is the currently mentioned project.
2021-09-15 19:01:46 +02:00
Henrik Lissner
69f8f5b242 feat(default): narrow to multi-line region in +default/search-buffer
Since multi-line inputs are useless to consult-line and swiper, I've
changed +default/search-buffer to be more DWIM (do-what-I-mean). i.e. if
a selection is active when invoking it, and...

- The selection is multi-line: restrict the search to that region.
- The selection is *not* multi-line: use the selection as the initial
  input.
- Otherwise, search the whole buffer as normal.
2021-09-15 01:22:33 +02:00
Henrik Lissner
35f701a999 fix(default): search region literally in +default/search-buffer 2021-09-15 01:22:33 +02:00
Itai Y. Efrat
2fdcefa831 feat(default): add +default/diagnostics
Unify flycheck-list-errors and flymake-show-diagnostics-buffer under
+default/diagnostics, and use consult-lsp-diagnostics if the lsp and
vertico modules are active.
2021-09-15 01:02:46 +03:00
Henrik Lissner
6b5c34a1db fix(default): region handling in +default/search-buffer
+default/search-buffer now correctly uses the active selection when
invoking `consult-line` (on 'SPC s s' or 'SPC s b').

Close #5406

Co-authored-by: Sævar Berg <saevarb@users.noreply.github.com>
2021-09-14 19:33:26 +02:00
Henrik Lissner
33b646826b fix(vertico): add counsel-file-jump analogue
Fix 'SPC f F' / 'C-c f F' for vertico users
2021-07-28 12:54:23 -04:00
Henrik Lissner
dd9657d90d Fix SPC f F w/ vertico + consult
Not a perfect analogue to counsel-file-jump, but it's a start (and
better than the previous no-op).
2021-07-25 17:55:59 -04:00
Itai Y. Efrat
770084fdda vertico: use consult-line in +default/search-buffer
While it only gives one candidate per line, it's more important to have
something that uses the completion UI
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
a0eb4e9b65 completion/selectrum -> completion/vertico, part 3
- Rename all functions and variables in the module to reflect the
  namechange (and the irc jump function)
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
24eaa1317c completion/selectrum -> completion/vertico, part 2
- Rename module from `:completion selectrum` to `:completion vertico`
- Rename all files involved
- Do *not* yet rename all the functions, as that messes up git's rename
  detection.
2021-07-25 02:51:15 +03:00
Itai Y. Efrat
49a5c51615 selectrum: fix bugs when counsel is loaded (hack)
some doom functions check the completion module with `fboundp`'s instead
of `featurep!`, and counsel can be loaded by using e.g. `lispy`. we add
temporary fixes for this by checking for selectrum stuff first, but this
should be given a more robust fix later on

also we document the selectrum PR's hacks in the TODO.org

see discussion on #5013
2021-07-25 02:50:42 +03:00
Itai Y. Efrat
ed922a62cb selectrum: improve bindings
- add missing emacs bindings
- properly feature guard swiper related bindings
- for selectrum, unbind `SPC s B` and temporarily bind `SPC s s` to
  isearch to prevent don't get errors until we decide what to do there.
- update readme to reflect that
2021-07-25 02:50:42 +03:00
Sebastian Sturm
0cdc7ec8e1 Add selectrum branch for SPC-* symbol search
other +default/search-... convenience methods already support
Selectrum explicitly, so perhaps there's a good reason not to
do the same for +default/search-project-for-symbol-at-point?
2021-07-25 02:49:41 +03:00
Edmund Miller
b741d6a3b9 fix(selectrum): Remove unnecessary advice overrides 2021-07-25 02:49:40 +03:00
Jethro Kuan
65c153796e Add selectrum project search 2021-07-25 02:49:40 +03:00
Jan Felix Langenbach
c84bc953d9 Simplify (% current-column tab-width) code 2021-05-13 10:50:44 +02:00
Jan Felix Langenbach
3c41823824 Fix wrong column being used and resulting bugs 2021-05-13 09:49:30 +02:00
Jan Felix Langenbach
6aa29e82ae Fix #4577: WS not at BOL is deleted to tab columns
Changes the behavior of
doom/backward-delete-whitespace-to-column
to only delete to the closest tab column if there
is only whitespace between point and BOL.
This coincides with what the comments state to be
the original intent.
2021-05-13 01:06:30 +02:00
Henrik Lissner
91f8d3e5d0 Fix void-variable sp-get-thing
When smartparens is disabled.
2021-02-15 14:57:14 -05:00
Henrik Lissner
be9b3ff352 Bind SPC f Y to yank path relative to project
Also, both commands now announce "Copied path to clipboard: ..." to make
it clear it worked (and what is being copied).
2021-02-15 14:54:13 -05:00
Shane Mook
c7029731d1 Updated projectile-project-search-path to use the correct arguments when
calling message and projectile-discover-projects-in-directory.
2021-01-28 18:51:42 -06:00
Henrik Lissner
2e088e7945 More feedback from +default/discover-projects
Log successes and failures to the echo area/*Messages* so we know the
command worked (or didn't).
2021-01-23 18:50:21 -05:00
Henrik Lissner
03fe396eea
Move +default/{find-in,browse}-emacsd to core lib
Renamed them to:

+ doom/find-file-in-emacsd
+ doom/browse-in-emacsd
2020-11-19 00:44:16 -05:00
Henrik Lissner
a6dc6275f8
Fix #3960: make prefix arg consistent in +default/search-project
Is documented to include ignored/hidden files in the search result, but
would prompt for another project instead.
2020-09-19 14:40:11 -04:00
Mike Chen
f22f2e28b8
Modifying wrong variable judgment logic 2020-08-28 15:57:58 +08:00
Mike Chen
5c9e21814e
Fix non evil environment (void variable evil this operator) 2020-08-28 15:40:08 +08:00
Henrik Lissner
841eacc77d
tools/lsp: lazy load <leader> c l keybind
Fixes a issue where folks would try to rebind <leader> c, only to get a
non-prefix key error about <leader> c l.
2020-08-27 17:44:58 -04:00
Henrik Lissner
d8908a0c32
Fix +default/newline indenting after newline
This was intended to be newline minus indent, since newline itself is
remapped to newline-and-indent.
2020-08-08 03:02:37 -04:00
Henrik Lissner
f82775fead
Fix 'Wrong type argument: commandp, +default/search-project'
Regression from #3656
2020-07-31 02:42:35 -04:00
Nham Le
6a4283c9d4 More convenient search buffer 2020-07-31 12:55:49 +07:00
Henrik Lissner
9c96feba56
Fix wrong-type-arg stringp error on +default/dired
When selecting a directory.
2020-07-27 18:09:57 -04:00
Henrik Lissner
87199113bd
SPC f d -> +default/dired
+default/dired will prompt you for a directory to open dired in. If
passed the universal argument, it will prompt you for a known project
instead.
2020-07-26 18:40:42 -04:00
Henrik Lissner
83faa84591
Fix backspace advice with multi-character sp pairs 2020-07-23 01:26:03 -04:00
Henrik Lissner
2cedf150ec
Fix #3268: overeager deletion of closing parens
Close #3566
2020-07-15 15:17:55 -04:00
Henrik Lissner
c0b7ff0f9d
Merge pull request #3347 from leoalekseyev/mygithub/develop
Don't set prefix-arg when delegating to ivy/helm from +default/search-project
2020-06-10 20:57:57 -04:00
Leo Alekseyev
8dd55901c3 Don't set prefix-arg when delegating to ivy/helm from +default/search-project
The prefix arg for +default/search-project is intended to enable the
user to pick search location, however when it propagates to the ivy
search function it turns on the "search ignored files" functionality,
which us typically not intended and, furthermore, can be (if desired)
turned on simply by typing the search command in, for exampe,
counsel-rg's case as `-uu -- mysearchterm`
2020-06-10 03:50:25 -07:00
Henrik Lissner
9f00dd4920
Warn if projectile-project-search-path is empty
When using +default/discover-projects
2020-06-10 02:55:59 -04:00
Henrik Lissner
8bf902d5f4
General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00