Commit graph

148 commits

Author SHA1 Message Date
Henrik Lissner
40e9a17160
fix(format): +format-with-eglot-fn: eglot detection 2024-05-21 17:16:55 +02:00
Henrik Lissner
3188d1766b
docs(format): +format-in-org-src-blocks-fn: add docstring 2024-05-21 17:16:46 +02:00
Henrik Lissner
069c235da2
fix(format): +format-in-org-src-blocks-fn
Didn't return non-nil, so whether or not it worked, Apheleia would
attempt to (ineffectually) format the org buffer afterwards.

Also remove unneeded beg/end checks (the functions always receive a
value).
2024-05-21 17:16:46 +02:00
Henrik Lissner
773bf46f5e
refactor(format): improve lsp/eglot formatter dispatchers 2024-05-21 17:16:46 +02:00
Henrik Lissner
02ce4ee2b9
feat(format): add eglot support
Fix: #7673
2024-05-21 17:16:46 +02:00
Henrik Lissner
4426d10692
refactor(format): introduce +format-functions 2024-05-21 17:16:45 +02:00
Henrik Lissner
1f83a8b3d8
bump: :editor
doomemacs/snippets@d490cba6d7 -> doomemacs/snippets@f022984ee1
emacs-straight/adaptive-wrap@fc9f0306f1 -> emacs-straight/adaptive-wrap@70005d2012
emacs-tree-sitter/ts-fold@75e72c658a -> emacs-tree-sitter/ts-fold@0627723e5f
joaotavora/yasnippet@5cbdbf0d20 -> joaotavora/yasnippet@297546f085
joostkremers/visual-fill-column@695a597892 -> joostkremers/visual-fill-column@db7c7c2365
justinbarclay/parinfer-rust-mode@6e6bdeeba3 -> justinbarclay/parinfer-rust-mode@8df117a3b5
raxod502/apheleia@56651724ad -> raxod502/apheleia@96a9805ecb
2024-05-21 17:16:39 +02:00
Henrik Lissner
ddd3f7564d
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-05-21 17:16:36 +02:00
Peter Hoeg
0857ecd751
bump: :editor format
radian-software/apheleia@c222927f70 -> radian-software/apheleia@56651724ad

fbd00b6 changes aphelia-core to aphelia, but only in 1 out of 2 places
and this is not the correct name in the version pinned in doom.

Fix: #7568
Amend: fbd00b6a0830
2024-05-21 17:16:26 +02:00
John Goff
107b390582
fix(format): correct name of feature 2024-05-21 17:16:25 +02:00
John Goff
0a6fafc6cc
docs(format): reasoning for using +format/buffer 2024-05-21 17:16:25 +02:00
John Goff
e26eff69ef
docs(format): describe interaction between +onsave and LSP 2024-05-21 17:16:25 +02:00
John Goff
fafe443717
refactor(format): describe what hook does 2024-05-21 17:16:25 +02:00
John Goff
b7aa5102f5
docs(format): fix name of doom-package 2024-05-21 17:16:25 +02:00
John Goff
798e62670e
docs(format): document +format-on-save-disabled-modes in README 2024-05-21 17:16:25 +02:00
John Goff
d05808dcbe
fix(format): align behaviour and documentation
`+format-on-save-disabled-modes` documentation was referencing behaviour
that no longer exists, as well as documenting behaviour that was not
implemented.
2024-05-21 17:16:25 +02:00
Henrik Lissner
5b08d78f2a
tweak(format): doom-debug-variables: add apheleia-log-only-errors 2024-05-21 17:16:16 +02:00
Henrik Lissner
c5746de8ff
refactor(format): swap to string-blank-p & memq 2024-05-21 17:16:15 +02:00
Henrik Lissner
4fa9362224
docs(*): replace all-the-icons with nerd-icons
Also colorizes the leading icon in notices.
2024-05-21 17:16:13 +02:00
LemonBreezes
9ec87ee6cd
fix(format): use +vc-gutter-update-h instead
+vc-gutter-init-maybe-h is not defined when using +diff-hl so instead
let's use +vc-gutter-update-h to refresh the VC gutter.
2024-05-21 17:16:12 +02:00
Ellis Kenyo
54ec3d4763
docs(format): improve note about regional formatting 2024-05-21 17:16:11 +02:00
Ellis Kenyo
fa55aa8ad9
fix(format): update missing values & set buffer modification
This prevents apheleia complaining about the editing buffer being
killed.

Co-authored-by: Wang Liao <lwlw1988@gmail.com>
2024-05-21 17:16:11 +02:00
Henrik Lissner
3ab5adc847
docs(format): set-formatter!: escape quotes in docstring 2024-05-21 17:16:11 +02:00
Ellis Kenyo
6b2a74094e
docs(format): clarify how to update macro in private config 2024-05-21 17:16:11 +02:00
Ellis Kenyo
36b38dbf1d
fix(format): removed unused argument 2024-05-21 17:16:10 +02:00
Ellis Kenyo
94342f23d9
fix(format): improve function/module loading safety 2024-05-21 17:16:10 +02:00
Ellis Kenyo
041af54ed5
fix(format): pin apheleia 2024-05-21 17:16:09 +02:00
Ellis Kenyo
cfbd24b65b
fix(format): remove merged formatter 2024-05-21 17:16:09 +02:00
Ellis Kenyo
ec26c877a0
fix(format): react to ns change 2024-05-21 17:16:08 +02:00
Ellis Kenyo
0cb26974f0
fix(format): apheleia-inhibit-functions after load 2024-05-21 17:16:08 +02:00
Ellis Kenyo
bfc172f554
fix(format): load format-on-save-disabled-modes fn
Should handle some corner cases with how inhibiting is set
2024-05-21 17:16:08 +02:00
Ellis Kenyő
31ce037a9f
docs(format): redo docs to handle refactor 2024-05-21 17:16:08 +02:00
Ellis Kenyő
80dd444109
fix(format): better handle format-on-save disable 2024-05-21 17:16:08 +02:00
Ellis Kenyő
7bb2db1049
fix(format): handle git-gutter nicely 2024-05-21 17:16:01 +02:00
Ellis Kenyő
14947d824d
feat(format): add :lang emacs-lisp formatter
Introduce a formatter function for emacs-lisp (tracked upstream here
[1]) that tries to preserve as much of what the user wants as possible

[1]: https://github.com/radian-software/apheleia/pull/102
2024-05-21 17:15:57 +02:00
Ellis Kenyő
279212dca5
fix(format): resolve list expansion issues
The argument list was being expanded incorrectly, this should now be resolved.
2024-05-21 17:15:57 +02:00
Ellis Kenyő
2fc6f6d30f
refactor(format): replace with apheleia
Initial refactor of format module to replace format-all with apheleia
2024-05-21 17:15:57 +02:00
TEC
5ac2a5258b docs: change link format 2022-10-05 01:01:19 +02:00
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
Henrik Lissner
057e6c531c
refactor: replace doom-enlist with ensure-list
doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).

Ref: 4bf49785fd
2022-08-07 19:43:13 +02:00
Henrik Lissner
1abcf913aa
revert: fix(docs): set mode in file-local vars
emacs-straight/org-mode@e22b4eb7aa introduced a breaking change that
made it impossible to rely on .dir-locals.el to change org-mode buffers
in $EMACSDIR to doom-docs-org-mode (without infinite recursion), so we
used file-local variables in 7e400ab.

emacs-straight/org-mode@215de6176b reverted that change, so we can use
.dir-locals.el again, and this is my preference, since it requires less
boilerplate across our hundreds of org files.

Ref: emacs-straight/org-mode@215de6176b
Ref: emacs-straight/org-mode@e22b4eb7aa
Revert: 7e400abdc0
2022-08-07 19:08:07 +02:00
Henrik Lissner
7e400abdc0
fix(docs): set mode in file-local vars
Due to emacs-straight/org-mode@e22b4eb, a replacement major mode (for
org-mode) can no longer be specified from .dir-locals.el, as it spirals
into infinite recursion. Therefore, a mode: line is needed in all Doom
docs.

Ref: emacs-straight/org-mode@e22b4eb7aa
2022-08-03 02:46:33 +02:00
Henrik Lissner
1255315bfc
refactor(docs): replace nav menus with virtual one
Now that the header is dynamically generated (when doom-docs-mode is
active), a literal header is unnecessary.
2022-08-02 19:37:07 +02:00
Henrik Lissner
e77a45bc22
docs: use lowercase keywords
As per Org's new defaults, which we're adopting elsewhere, so may as
well adopt it here.
2022-08-02 16:23:43 +02:00
Henrik Lissner
7246db457c docs: replace doom-source with doom-repo links
I will later use "source" to refer to module sources, so better we avoid
the terminology for now.
2022-02-01 18:55:27 +01:00
Henrik Lissner
88844e9cec docs: simplify internal docs links
Fewer links means less confusion.

- Merge doom-issue and doom-commit links into doom-ref (for auto-linking
  Issue/PR/commit references).
- Merge doom-module-source and doom-docs-source links into doom-source.
- Rename doom-report-issue to doom-report.
- Use '!' as the icon for module issues link.
- Remove doom-repo (replaced with "doom:*" in :lang org module).
- Add doomdir and emacsdir links to :lang org module.
2021-11-21 20:04:28 +01:00
Henrik Lissner
9ada400805 docs(:editor): update READMEs to new format 2021-11-21 20:04:28 +01:00
Henrik Lissner
4549b275f2 fix(format): format-all-mode not activating
Also makes format-all log more when doom-debug-mode is on.

Fix #5589
2021-10-06 13:58:16 +02:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
LuoZhipeng
bf488394e9 editor/format lsp feature requirement from textDocument/rangeFormatting to textDocument/formatting. 2021-07-27 17:49:57 +08:00