Commit graph

853 commits

Author SHA1 Message Date
Henrik Lissner
737f91242a
bump: :editor evil
emacs-evil/evil-collection@772571fc67 -> emacs-evil/evil-collection@6365e7c8ae

Revert: 9d7885abbf
Ref: emacs-evil/evil-collection#833
2024-09-07 19:04:37 -04:00
Henrik Lissner
f81798eb0a
module: undeprecate :editor god
The god-mode package is maintained now.

Amend: 9ada400805
2024-09-02 06:26:23 -04:00
Henrik Lissner
8c4d871f7c
fix(evil): respect evil-disable-insert-state-bindings 2024-08-30 03:15:43 -04:00
Henrik Lissner
6671adc687
refactor!: move helpful from :core to :lang emacs-lisp
BREAKING CHANGE: This moves helpful.el out of core into :lang
emacs-lisp. Since most (all) people have this module enabled, this
shouldn't make a difference for most people, but if you're one of the
few that don't have :lang emacs-lisp enabled, Doom will revert to using
Emacs' built-in help.el and describe-* commands.

Others can also disable helpful with (package! helpful :disable t) if
they prefer Emacs' built-in help system, which wasn't possible before,
because it was a core package.

This was done as part of an ongoing effort to slim down Doom's core in
preparation for v3.
2024-08-30 02:26:41 -04:00
Henrik Lissner
89f5af8104
refactor(fold): move +fold-hideshow-folded-face & unstyle +ts-fold-replacement-face
It is the theme(s) jurisdiction to impose modify external faces.
`custom-set-faces!` should be avoided from within modules, in general.
2024-08-27 03:13:57 -04:00
Henrik Lissner
9a6bcc31f9
feat(fold): add +fold-ellipsis var
Bring *some* consistency to the text display when text is
ellided/folded.

Close: #7743
Co-authored-by: seanfarley <seanfarley@users.noreply.github.com>
2024-08-27 03:13:56 -04:00
Henrik Lissner
4f5f9d6065
refactor(evil): remove unused +evil-repeat-keys variable 2024-08-26 17:03:04 -04:00
Henrik Lissner
62f9b2ec94
feat(parinfer): enable for dune-mode
Close: #8019
Co-authored-by: i-am-linja <i-am-linja@users.noreply.github.com>
2024-08-25 17:44:28 -04:00
Henrik Lissner
804da58540
fix(format): disable on-save for LaTeX-mode
Since latex-mode != LaTeX-mode.
2024-08-22 12:32:14 -04:00
Henrik Lissner
a0c901cca7
fix(format): lsp-mode/eglot formatters
There seems to be context that eglot needs that isn't available in
Apheleia's scratch buffer.

Fix: #7962
2024-08-22 12:32:14 -04:00
Henrik Lissner
c1c3b521d6
bump: :editor evil
emacs-evil/evil-collection@e49d8e96cc -> emacs-evil/evil-collection@772571fc67
emacs-evil/evil@30ebe6df27 -> emacs-evil/evil@5db0bdc7dc
2024-08-20 18:07:42 -04:00
Henrik Lissner
abf19aa63e
tweak(format): +format/region: emit message on success 2024-08-20 16:36:22 -04:00
Henrik Lissner
67e5dda526
fix(format): void-function +javascript-npm-conf error
Amend: c0a1b9efc9
Close: #8005
2024-08-20 16:27:34 -04:00
Henrik Lissner
50adaa9e48
fix(format): prettier-*: 'void-variable unless' error
Also short-circuits the condition with
apheleia-formatters-respect-indent-level, if it's been disabled.

Amend: c0a1b9efc9
Ref: #7998
2024-08-19 16:21:08 -04:00
Henrik Lissner
c0a1b9efc9
fix(format): prettier: don't override prettier indent config
Apheleia's default config for prettier adds --use-tabs/--tab-width to
force prettier to match Emacs' indent settings, which is fine until a
prettier config file tries to overwrite it and is ignored. As a
compromise (and stopgap solution), I omit these flags if any prettier
settings are set in the current project.

Fix: #7998
2024-08-18 03:59:18 -04:00
Henrik Lissner
f6040832e5
nit(format): move formatter configs to bottom
There will likely be more of these later, so I move them to the bottom
of the :config block.
2024-08-16 14:58:33 -04:00
Henrik Lissner
5e2e886b35
nit: comment revision & reformatting 2024-08-15 23:18:47 -04:00
Henrik Lissner
511c8af365
bump: :editor
doomemacs/snippets@3a0b029c5d -> doomemacs/snippets@b672e69bbf
emacs-evil/evil-collection@acb056b1d0 -> emacs-evil/evil-collection@e49d8e96cc
emacs-evil/evil@0ad84c5216 -> emacs-evil/evil@30ebe6df27
emacs-straight/adaptive-wrap@a3b179ea21 -> emacs-straight/adaptive-wrap@d75665b9c8
emacs-tree-sitter/ts-fold@5b8abb69cd -> emacs-tree-sitter/ts-fold@55f80a202a
gabesoft/evil-mc@bdf893ea6f -> gabesoft/evil-mc@cff3374bfe
justinbarclay/parinfer-rust-mode@a96c768e9d -> justinbarclay/parinfer-rust-mode@0d16bd75ad
2024-08-09 17:41:49 -04:00
Henrik Lissner
c93b70237c
fix(evil): defer evil-collection-kmacro
Emacs 30+ loads kmacro.el eagerly at startup, pulling in all of
evil-collection, so I defer it until it's needed.
2024-08-09 17:41:49 -04:00
Henrik Lissner
877008a00e
fix(evil): set evil-want-keybinding sooner
Early loading of evil-collection may trigger an annoying (and
unsuppressable) warning, otherwise.
2024-08-09 17:41:48 -04:00
Henrik Lissner
0bac5fe132
fix(format): register shfmt for sh-mode
Apheleia already has a (and better) definition for shfmt.

Fix: #5268
2024-07-30 02:54:25 -04:00
Henrik Lissner
04efd82590
feat(evil): optionally wrap move-window commands
Introduces an `+evil-want-move-window-to-wrap-around` option. If
non-nil, `+evil/window-move-*` commands will wrap around the frame. If
these commands are passed the prefix arg, behave as if
`+evil-want-move-window-to-wrap-around` were inverted (just once).

Close: #7218
Co-authored-by: agzam <agzam@users.noreply.github.com>
2024-07-29 18:51:50 -04:00
Henrik Lissner
69f4b70069
fix(evil): remove gA keybind
I was working on a +lookup/assignments around the time I introduced
+lookup/implementations, but I dropped it and forgot to remove this
keybind, which snuck in on f1d89bf.

Amend: f1d89bf9c2
2024-07-25 19:43:28 -04:00
Henrik Lissner
13ed89f235
fix(format): disengage selection after +format-region
Fix: #7951
2024-07-16 11:34:14 -04:00
Henrik Lissner
1eaa1aef2c
refactor(format): rename to +format/org-blocks-in-region
To better reflect that it operates on multiple blocks.

Ref: #7936
2024-07-14 02:00:24 -04:00
Henrik Lissner
7543b04e15
feat(format): add +format/org-block-in-region
Also updates `+org/reformat-at-point` to call
`+format/org-block-in-region` if selection is active.

Fix: #7936
2024-07-14 01:57:20 -04:00
Henrik Lissner
ce84690dc5
feat(evil): vim completion keybinds on C-x
Vim has a set of completion commands bound to the C-x prefix. We had
this for company, but with this commit, we now have them for the corfu
module.
2024-07-13 19:38:20 -04:00
Henrik Lissner
9d7885abbf
fix(evil): q/Q keybinds in view-mode
Caused by evil-collection-view binding q to quit-window, which breaks
view-exit-action. This should be reported upstream.
2024-07-10 01:16:29 -04:00
Henrik Lissner
e43d575caf
refactor(lib): don't use smartparens' API
Toward our eventual goal of moving smartparens out of core, I've adapted
this from code provided by hpfr on Discord, which was adapted from
smartparen's syntax-ppss caching logic. `:config default` will need need
some attention before we can fully move smartparens to its own `:editor
smartparens` module.

Co-authored-by: hpfr <hpfr@users.noreply.github.com>
2024-07-09 20:55:29 -04:00
Eloise Christian
081231b73f fix(format): apheleia doesn't invoke lsp formatter
change `+format--lsp-fn` to run `+format--lsp-fn` in context of main
buffer rather than apheleia's scratch buffer so that the lsp mode can
be discovered
2024-07-08 21:41:39 -04:00
Henrik Lissner
dfe9d572a7
docs(format): hacks: mention save-buffer advice 2024-07-08 13:59:16 -04:00
Henrik Lissner
7d25ba3f6c
fix(format): void function +format-with-lsp-maybe-h error
Regression introduced in fd1941b.

Amend: fd1941b95f
2024-07-08 13:59:06 -04:00
Henrik Lissner
6b526b1b47
refactor(format): +format/org-block: make arg optional 2024-07-07 21:48:17 -04:00
Henrik Lissner
f104f10c5b
docs(format): revise README.org
To reflect recent changes and for clarity.
2024-07-07 21:48:17 -04:00
Henrik Lissner
fd1941b95f
refactor!(format): simplify & gate lsp/eglot impl behind +lsp
BREAKING CHANGE: This commit introduces two changes, a breaking, one
not.

The breaking change: `+format-with-lsp` used to control lsp-mode/eglot
integration for this module, but it is now gated behind a new +lsp flag.
Users will need to add it to their `doom!` blocks (in $DOOMDIR/init.el)
to restore the integration.

The other change: I've merged the former `lsp` and `eglot` formatters
into a single `lsp` formatter that dispatches to the appropriate
backend, as well as wrapping this integration in a
`+format-with-lsp-mode` minor mode, so it can be toggled at will; mainly
to assist in debugging formatter behavior.

A unified formatter makes it easier for folks to configure
`+format-with` on a per-project/directory/file basis, without needing to
know what backend this module uses, and opens us up to integrating other
LSP backends in the future (like lsp-bridge).
2024-07-07 21:43:27 -04:00
Henrik Lissner
cca40c0277
tweak(format): doom-debug-variables: add apheleia-log-debug-info 2024-07-07 21:43:27 -04:00
Henrik Lissner
d648bfda40
docs(format): revise docstrings and comments 2024-07-07 20:41:03 -04:00
Henrik Lissner
c5c7f0bc99
feat(format): add +format-inhibit alias
I want both `apheleia-formatter` and `apheleia-inhibit` exposed for easy
setting from directory/file-local variables (like .dir-locals.el), but
I'd like to abstract away the implementation (Apheleia) a little, hence
these aliases. This way, whether or not we're still using Apheleia in a
year or three, `+format-with` and `+format-inhibit` should always work.
2024-07-07 16:31:24 -04:00
Henrik Lissner
5e78ed0911
refactor(format): use eglot-server-capable
eglot--server-capable was deprecated.
2024-07-07 14:39:50 -04:00
Henrik Lissner
deb59ca4ad
fix(format): LSP formatters before Apheleia is loaded 2024-07-07 14:39:27 -04:00
Henrik Lissner
21a427c33b
fix(format): eglot-managed{,-mode}-hook hook 2024-07-06 21:18:34 -04:00
Henrik Lissner
17d4aaace3
fix(format): add lsp functions
Forgot to include these functions in 8072762. Oops.

Amend: 8072762de8
2024-07-06 21:03:12 -04:00
Henrik Lissner
8072762de8
refactor(format): redesign module
Rather than wrap Apheleia in custom formatting logic, I now use
Apheleia's own machinary to integrate into LSP and Eglot, which is less
complexity to maintain. It also makes settings +format-with a more
reliable option for per-project or per-file configuration.

This also adds a +format/org-src-block command, which I'll incorporate
into the org module in a follow-up commit.

Ref: #7685
2024-07-06 19:54:55 -04:00
Henrik Lissner
2bfb7821b6
refactor(evil): +evil--window-swap: no-op if on edge
Also error checks DIRECTION, just in case.
2024-07-05 20:10:57 -04:00
Henrik Lissner
39ee7129ef
refactor(evil): remove unneeded advice
This was resolved upstream.

Fix: #2493
Ref: emacs-evil/evil#1268
2024-06-30 22:20:39 -04:00
45mg
42ae401deb fix(fold): +fold/next: actually support outlines
The docstring says that this function will move to the next folded
outline heading, but this had not been implemented.
2024-06-27 18:07:33 -04:00
45mg
bff7baca69 fix(fold): fold-levels off-by-one
Without this change, we need to pass a prefix arg that is one more than
the actual fold-level we're trying to achieve; `C-u 2` is equivalent to
not passing a digit arg. While this looks intentional, I don't see what
purpose it serves.

This change provides saner behavior that matches other commands that
handle fold-levels (eg. `org-fold-hide-sublevels`).
2024-06-27 18:07:19 -04:00
45mg
56e998c577 fix(fold): properly handle recursive folds
With four folding systems in play, there are numerous ways to create
nested folds (eg. hideshow folds inside folded outline headings with
`+fold/close-all`). So `+fold/open-rec' needs to be able to open all
kinds of folds within the newly unfolded region. It can't stop at
unfolding the type of fold it was called on.
2024-06-26 20:45:14 -04:00
45mg
c471ab00a6 fix(fold): don't expect evil-vimish-fold
This module is also used by non-Evil users. Also,
`evil-vimish-fold/next-fold` and friends just wrap the corresponding
vimish-fold functions in `dotimes`, anyway.
2024-06-26 20:45:00 -04:00
Henrik Lissner
cc7a509e10
bump: :editor fold
emacs-tree-sitter/ts-fold@6ce584d1ac -> emacs-tree-sitter/ts-fold@5b8abb69cd
2024-06-25 19:36:51 -04:00