Commit graph

73 commits

Author SHA1 Message Date
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
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
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
Henrik Lissner
7ce9a99583
fix(fold): only enable ts-fold-mode in tree-sitter buffers
ts-fold-mode is buffer-local, and will complain if activated in a buffer
tree-sitter doesn't support (e.g. fundamental-mode). global-ts-fold-mode
will filter based on tree-sitter-mode's activation and language support.

Fix: #7895
2024-06-25 19:36:51 -04:00
Henrik Lissner
a3a0629e03
bump: :editor
doomemacs/snippets@c1384cc797 -> doomemacs/snippets@3a0b029c5d
emacs-evil/evil-collection@ca977acb83 -> emacs-evil/evil-collection@acb056b1d0
emacs-evil/evil@0251080640 -> emacs-evil/evil@0ad84c5216
emacs-straight/adaptive-wrap@70005d2012 -> emacs-straight/adaptive-wrap@a3b179ea21
emacs-tree-sitter/ts-fold@0627723e5f -> emacs-tree-sitter/ts-fold@6ce584d1ac
emacsmirror/visual-fill-column@5e74afe39d -> emacsmirror/visual-fill-column@e04d3521b6
joaotavora/yasnippet@297546f085 -> joaotavora/yasnippet@eb5ba2664c
juliapath/evil-numbers@7a1b62afc1 -> juliapath/evil-numbers@c789989451
justinbarclay/parinfer-rust-mode@e9a23e136b -> justinbarclay/parinfer-rust-mode@a96c768e9d
magnars/multiple-cursors.el@234806c832 -> magnars/multiple-cursors.el@c870c18462
radian-software/apheleia@96a9805ecb -> radian-software/apheleia@61766b50b2
2024-06-22 18:14:05 -04:00
45mm
142f28eb9a fix(fold): properly support outline-minor-mode
- Make `+fold/close-all` work for outline-minor-mode.

- Distinguish between `zo` and `zO` for outline-minor-mode alone, by
  binding `zO` to a new function `+fold/open-rec`. `zO` will now trigger
  `outline-show-subtree` in outline-minor-mode, while `zo` will only
  trigger `outline-show-branches`, keeping the subheadings folded. This
  matches the behavior in org-mode.

- Fix a bug in `+fold/open-all`, introduced in
  7b9d00d661, that makes it only operate
  on vimish-fold folds.

Note that outline-minor-mode is still not enabled by default anywhere.
These changes are only to prevent incorrect behavior for users who
decide to turn it on themselves.
2024-04-01 13:30:43 -04:00
Ian McCowan
c564c17a6b fix(fold): reorder fold type checks
(+fold--ts-fold-p) just checks that the mode is active so it will block
any checks following it. Move it to the end so other fold types have a
chance, and consistently order fold type checks.
2024-03-19 23:57:15 -04:00
Henrik Lissner
e701522d68
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-02-04 19:18:24 -05:00
Henrik Lissner
80f8b6b680
bump: :editor fold
emacs-tree-sitter/ts-fold@9d9e0c5cf7 -> emacs-tree-sitter/ts-fold@75e72c658a

- (#7480) Adds/enhances support for new languages.

Co-authored-by: jperras <jperras@users.noreply.github.com>
Close: #7480
Ref: https://github.com/emacs-tree-sitter/ts-fold/releases/tag/0.2.0
2023-11-23 18:32:35 -05:00
Henrik Lissner
88bb045388
docs(*): replace all-the-icons with nerd-icons
Also colorizes the leading icon in notices.
2023-09-16 20:19:11 +02:00
Henrik Lissner
1040dd45b6
bump: :editor
abo-abo/auto-yasnippet@db9e0dd433 -> abo-abo/auto-yasnippet@6a9e406d0d
abo-abo/lispy@df1b7e614f -> abo-abo/lispy@097dd66e66
doomemacs/snippets@2d031f7231 -> doomemacs/snippets@fe4003014a
emacs-tree-sitter/ts-fold@01d6485398 -> emacs-tree-sitter/ts-fold@9d9e0c5cf7
emacsorphanage/god-mode@49c1a17531 -> emacsorphanage/god-mode@607aff10a7
joostkremers/visual-fill-column@453d698d7f -> joostkremers/visual-fill-column@695a597892
justinbarclay/parinfer-rust-mode@c2c1bbec6c -> justinbarclay/parinfer-rust-mode@332c7f4742
magnars/multiple-cursors.el@aae47aebc0 -> magnars/multiple-cursors.el@16223efc2d
noctuid/lispyville@9c14bed035 -> noctuid/lispyville@14ee8711d5
2023-02-21 19:34:42 -05:00
Ta Quang Trung
acdd0a4865
fix(fold): set ts-fold-replacement-face fg to unspecified 2023-02-17 11:45:06 -05:00
TEC
5ac2a5258b docs: change link format 2022-10-05 01:01:19 +02:00
Henrik Lissner
e499e05ff3
fix(fold): void-function evil-define-key* error on Emacs 29 2022-09-16 03:17:46 +02:00
Jen-Chieh Shen
f8bd14ebc3
bump: ts-fold
jcs090218/ts-fold@01d6485398 -> emacs-tree-sitter/ts-fold@01d6485398

The repo has moved.
2022-09-07 00:24:57 +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
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
1f8bf7accb
merge: rewrite-docs
I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
2022-08-03 03:27:50 +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
Jeetaditya Chatterjee
cf0696f54b docs(fold): mention ts-fold package 2022-06-18 00:16:31 +02:00
Jeetaditya Chatterjee
4334eb285f
nit(fold): fix non idiomatic code
- remove final t in cond
- replace cond with if
- replace seq-filter with cl-remove-if-not
2022-05-22 21:26:08 +01:00
Jeetaditya Chatterjee
cd6cb8c499
fix(tree-sitter): check tree-sitter-mode is bound
and-true-p
2022-05-22 21:26:08 +01:00
Jeetaditya Chatterjee
cc238dd666
bump: :editor fold ts-fold
jcs090218/ts-fold@d6fbca3748 -> jcs090218/ts-fold@01d6485398
2022-05-22 21:26:07 +01:00
Jeetaditya Chatterjee
32bf2ee4cf
fix(tree-sitter): message raised when jumping up
as opposed to a nasty error,
the error was raised because I was not using the abs of count
this commit also comes with general code cleanup,
this includes
- removal of the eval quasiquote antipattern when an apply would work
better
- use of the :key keyword instead of the lambda
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
6127692848
fix(fold): handle bounding error
This basically stops the "not overlay" error we were getting when you
tried to jump to many times. this does have the disadvantage of not
jumping at all if the amount of jumps is higher than the amount of
overlays but this can be fixed in a future commit if necessary.
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
c16e16e92b
feat(fold): define ts-fold movement logic
As ts-fold does not provide fold movement logic I made my own. This can
and probably should be upstreamed but the details for that are not clear
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
caa64e8324
feat(fold): change ts-fold replacement face
this is to make it similar to hideshow
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
7b9d00d661
feat(tree-sitter): add ts to open/close all
also refactor +fold-open-all, +fold-close-all to use cond instead of the
when case for vimish fold.
2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
c3e360eeaa
tweak(tree-sitter): add tree sitter check to foldp
instead of just checking if ts-fold is enabled I also check i
tree-sitter mode is actually enabled if not it will move onto hidehshow
2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
c1f640209a
feat(fold): add ts-fold support to wrappers
Changes:
- add +fold--ts-fold-p which only checks if the feature is around
- add ts-fold into +fold/toggle, +fold/open, +fold/close
- update doc strings
2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
83d22fe5ef
feat(fold): add ts-fold 2022-05-22 21:26:01 +01: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
1decc38237 docs: fix module readme CREATED & SINCE attrs
Some were missing PR references, others had incorrect values for SINCE
and CREATED attributes. Also corrects the capitalization in some
SUBTITLEs.
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
andrewsuperlegit
b633e920cc
Fixed the keybind for fold/unfold all
The keybinding for fold all and unfold all was wrong (was missing a C-f)
2021-07-29 18:46:08 -05:00
Henrik Lissner
141938ef94 editor/fold: fix load-order dependency on evil
In case the user is enabling this module before the evil module.
2021-05-15 19:24:40 -04:00
Itai Y. Efrat
354fb748f3 :editor fold - minor documentation fix 2020-12-17 20:25:23 +02:00
Henrik Lissner
7838e312e2
Bump :editor
DogLooksGood/parinfer-mode@eaad857 -> DogLooksGood/parinfer-mode@91856b9
abo-abo/lispy@0a9dcfd -> abo-abo/lispy@5c8a59a
clemera/objed@dea5a64 -> clemera/objed@70f9fb5
emacs-evil/evil-collection@05ed92a -> emacs-evil/evil-collection@ab5bb7c
emacs-straight/adaptive-wrap@319db64 -> emacs-straight/adaptive-wrap@8f60ee7
gabesoft/evil-mc@4d4c017 -> gabesoft/evil-mc@7dfb2ca
hlissner/doom-snippets@e1cbbdf -> hlissner/doom-snippets@33eb93b
magnars/multiple-cursors.el@b880554 -> magnars/multiple-cursors.el@83abb05
matsievskiysv/vimish-fold@9d12e39 -> matsievskiysv/vimish-fold@a6501cb
2020-12-05 16:55:27 -05:00
George Xanthakis
d50b1528b8
Remove unnecessary use-package statement 2020-11-04 11:43:26 +02:00
George Xanthakis
a88d29580d Update documentation with new keybinds 2020-10-30 20:27:24 +02:00
George Xanthakis
7eaf402c0b Lazy load vimish-fold 2020-10-29 23:35:05 +02:00
George Xanthakis
3afc81662a Add documentation for the fold module 2020-10-24 00:27:09 +03:00