Commit graph

67 commits

Author SHA1 Message Date
Henrik Lissner
6209366987
fix(workspaces): +workspaces/kill
One-off issue with +workspaces/kill not killing the correct tab or
killing buffers associated with the current buffer.
2025-09-19 18:29:22 -04:00
Henrik Lissner
7baa364543
tweak(workspaces): +workspaces-remove-buffer-from-tab: make tab arg optional 2025-09-19 18:28:55 -04:00
Henrik Lissner
4b69b2a957
fix(workspaces): +workspaces-buffer-list: include current tab's 2025-09-19 18:28:38 -04:00
Henrik Lissner
c117897290
feat(workspaces): expand and polish API
Needs more refactoring!
2025-09-18 21:57:45 -04:00
Henrik Lissner
704bf439d6
fix(workspaces): close-window-or-workspace remaps 2025-09-17 11:23:04 -04:00
Henrik Lissner
1592b07a7a
fix(:completion): update for tabspaces 2025-09-16 12:50:34 -04:00
Henrik Lissner
251195e688
fix(workspaces): +workspaces/kill: safeguards 2025-09-15 22:50:24 -04:00
Henrik Lissner
a2f4655290
fix(workspaces): leader keybinds
These are not final.
2025-09-15 22:49:15 -04:00
Henrik Lissner
64ab02e989
fix(workspaces): vim keybinds & ex commands for tabs
- Changed the ex commands to match neovim's ex commands.
- Fixes gt, gT, ]w, [w keybinds
- Add :tabe[dit] FILE
2025-09-15 22:44:41 -04:00
Henrik Lissner
f40bbad375
fix(workspaces): evil ex commands 2025-09-15 20:32:01 -04:00
Henrik Lissner
243b258f8d
refactor!(workspaces): replace persp-mode w/ tabspaces
BREAKING CHANGE: As the name says, this is a whole new package. There
will be functional hiccups until I've achieved behavioral parity with
the old workspaces module.
2025-09-14 20:35:13 -04:00
Henrik Lissner
b2e4e8e27c
revert: persp-mode
Bad-ptr/persp-mode.el@82680795b3 -> Bad-ptr/persp-mode.el@40e9993a97

persp-mode introduced some breaking API changes in a recent refactoring,
which have caused issues that are difficult to opt out of, even by
repinning it to an older commit. Until persp-mode sorts things out, I
simply revert it back to a point before all the changes.

Revert: c64ca09ed2
Revert: 751ac6134b
Revert: 6d5e004b87
Amend: a1121acc94
Fix: #8455
Close: #8474
Ref: #8470
2025-09-01 14:33:53 +02:00
Henrik Lissner
c64ca09ed2
fix(workspaces): arity error creating workspaces
The signature of persp-window-state-get-function changed upstream in
persp-mode (bumped in a1121ac).

Fix: #8454
Amend: a1121acc94
2025-08-11 01:22:41 +02:00
Henrik Lissner
a1121acc94
bump: :ui
Alexander-Miller/treemacs@abd27c86df -> Alexander-Miller/treemacs@5fa8419950
Bad-ptr/persp-mode.el@40e9993a97 -> Bad-ptr/persp-mode.el@f146ddccaf
dgutov/diff-hl@9b032018fd -> dgutov/diff-hl@39f076efa8
doomemacs/themes@729ad03463 -> doomemacs/themes@3152c60bb5
jaypei/emacs-neotree@4a4cd85761 -> jaypei/emacs-neotree@3178805a09
jdtsmith/indent-bars@87729d685d -> jdtsmith/indent-bars@aa07a3d812
jdtsmith/ultra-scroll@b447044b9d -> jdtsmith/ultra-scroll@8c92a17743
minad/goggles@5176114e99 -> minad/goggles@791140df23
seagle0128/doom-modeline@a85cb28da8 -> seagle0128/doom-modeline@cb703c217e
tarsius/hl-todo@7ed8bbcadb -> tarsius/hl-todo@b8be53068b

Includes some refactors to the workspaces and vc-gutter modules to adapt
to upstream changes in persp-mode and diff-hl.
2025-08-10 15:34:44 +02:00
duli
361eec11a4 fix(workspaces): avoid duplicate workspace creation when no frame exists
When Emacs is started as a daemon and no frames exist, `emacsclient -c`
should simply switch to the main workspace. However, before
`+workspaces-associate-frame-fn` is called, the new frame is already
added to the frame list, which causes `persp-frame-list-without-daemon`
to always return a non-empty list. A new workspace will be created
instead of switching to the main one.
2025-06-01 00:45:04 +02:00
Henrik Lissner
722f5a2e18
fix(workspaces): use existing workspace on project switch
A "workspace already exists" error is thrown if trying to switch to
project workspace that already exists. This changes it to switch to the
workspace instead.

Fix: #8368
2025-05-06 00:26:27 -04:00
Henrik Lissner
6f6302d42d
fix(workspaces): clobbering pre-existing workspaces on switch-project
If you used `projectile-switch-project`, the workspaces module would
open a new workspace named after the project, but if a  workspace named
after that project already exists, it is hijacked (e.g. two projects in
'some-project/src' and 'another-project/src' would get the same name:
"src"). This commit uniquifies their names so this doesn't happen, and
also embeds a +workspace-project persp parameter in the workspace so
that they can be disamiguated later (this association is lost if you
rename the workspace manually, however).

Fix: #7637
2025-04-01 03:27:03 -04:00
Henrik Lissner
c6f979b4e0
refactor(workspaces): projectile integration
Simplifies +workspaces-switch-to-project-h and refactors out the
dependency on external state.
2025-04-01 03:27:03 -04:00
Henrik Lissner
7941dfa766
fix(workspaces): only trigger projectile-*-switch-project-hook once
Changes upstream made our triggers for these hooks redundant.

Fix: #6559
2025-04-01 03:27:02 -04:00
Kyuvi
8f57069dd5
feat(workspaces): add count arg to switch-{left,right} commands 2025-01-08 19:46:08 -05:00
Chenty
b835e7b6ec
fix(workspaces): don't overwrite previously workspaces on save
Otherwise, each time `+workspace-save` is called, all prior saved
workspaces would be deleted from `+workspaces-data-file` before
inserting the new one.
2024-08-22 12:20:17 -04:00
Henrik Lissner
b3bea23331
fix(workspaces): "none" workspace
Doom removes the "none" workspace from persp-mode's default list of
perspectives, because it is a special case that doesn't behave
identically to other persps in the list, making it a pain to deal with.

This worked fine up until a change to `persp-update-names-cache` (in
Bad-ptr/persp-mode.el@0d6cacc) made it re-insert this "none" workspace
into `persp-names-cache` whenever it is called, undoing our hack; this
commit adapts to that change.

Ref: Bad-ptr/persp-mode.el@0d6caccab3
Ref: Bad-ptr/persp-mode.el@b2e68f97cb
Fix: #7986
Amend: 7f3412e317
2024-08-09 15:42:54 -04:00
Henrik Lissner
9cdcfdac36
feat(workspaces): add +workspace/delete
For deleting saved workspaces (saved with `+workspace/save` or
`+workspace-save`).

Also binds `SPC TAB D` (for evil users) and `C-c w K` (for non-evil
users) to it.

Fix: #4399
Close: #7869
Co-authored-by: sriramsk1999 <sriramsk1999@users.noreply.github.com>
2024-07-29 20:57:56 -04:00
Henrik Lissner
5289861109
refactor(workspaces): +workspace/delete: rename to +workspace/kill
To be more consistent with other uses of the verb in the Emacs
ecosystem. Also done in preparation for a new +workspaces/delete command
for #7869.

Ref: #7869
2024-07-05 18:05:15 -04:00
Henrik Lissner
90070c639a
fix(workspaces): remove ivy integration
Due to upstream changes in ivy-rich, +workspace/switch-to throws a
`wrong-type-argument listp leaf` error. As I plan to phase out Ivy
support (and the Ivy module) in the long term, I'll simply remove
ivy (and ivy-rich) integration in the workspaces module, rather than
update it.

Fix: #7499
Fix: #7173
2024-03-26 10:11:34 -04:00
roife
1a2789c922
fix(workspaces): check before loading tab configuration
Fix: #7139
2023-10-05 17:46:46 +02:00
Emily Bourke
fd98b44e6a tweak(workspaces): prefill current name on rename
This change uses completing-read to get the new name from the user when
renaming workspaces, to allow them to more easily make a small change to
the existing name of a workspace.
2023-09-12 21:23:48 +02:00
Henrik Lissner
086e9a9322
feat(workspaces): +workspace/switch-to: add buffer list column
To offer more context for ivy users while switching between workspaces.

Close: #3006
Co-authored-by: rgrinberg <rgrinberg@users.noreply.github.com>~
2023-02-18 15:27:47 -05:00
roife
d12b0ebc80 fix(workspaces): save current tab-bar tabs to file 2023-02-18 01:01:49 -05:00
Antonio Ruiz
191745424b feat(workspaces): make tab-bar tabs workspace-local 2022-10-05 15:14:44 +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
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
Henrik Lissner
3aeb0c060f Fix #5195: workspace is killed on magit commit
Due to magit now using server-done instead of server-edit as of
magit/magit@5c02910, which calls server-done-hook, which the workspaces
module has a hook on to kill auto-generated, daemon-spawned frames,
causing workspaces to be prematurely killed when commiting in magit.
2021-07-10 16:32:53 -04:00
Colin Woodbury
42ff369142
SPC TAB N binding (#5173)
* Introduce `SPC TAB N` binding

* Add vanilla Emacs binding
2021-07-09 01:13:13 -04:00
Henrik Lissner
87e209badc Remove vestigial mentions of the :feature category
It was removed long, long ago.
2021-03-06 00:49:36 -05:00
Henrik Lissner
ea35023765
Fix prefix arg for +workspace/new 2020-10-04 23:17:50 -04:00
Henrik Lissner
60ca118eb2
Fix #3166 and #3288: over-eager project-root caching
And prevent explicit projectile-project-root interfering with project
switching.
2020-06-04 19:43:20 -04:00
Henrik Lissner
031dc5eb1d
Fix +workspaces-switch-project-function not respecting dir local vars 2020-03-10 01:47:34 -04:00
Henrik Lissner
505ca8712d
Prevent 'not in valid workspace' error on switch project 2020-02-25 14:13:07 -05:00
Henrik Lissner
8049914e0e
Fix #2591: fix project switch hooks not running
When :ui workspaces was enabled.
2020-02-24 20:47:57 -05:00
Henrik Lissner
3ab70d78eb
Add +workspace/swap-{left,right} commands
For changing the order of workspaces.

Relevant to #2488, #2487
2020-02-06 15:20:42 -05:00
Henrik Lissner
5eeb362610
Ensure workspace in insertion order
Closes #2488
Fixes #2487
2020-02-06 15:20:42 -05:00
Henrik Lissner
9fce4d5106
Remove +workspace-buffer-list return order #2315
I cannot guarantee this. We simply return was `persp-buffers PERSP`
returns. How buffers are ordered is up to persp-mode.
2020-01-06 00:58:08 -05:00
Henrik Lissner
195dfda045
Minor refactors & comment revision 2020-01-02 21:16:02 -05:00
Henrik Lissner
adc8cba14b
Revise docstrings & minor reformatting 2019-12-26 01:41:44 -05:00
Henrik Lissner
a49c0b6691
Output feedback from buffer/session kill commands 2019-12-21 03:30:44 -05:00
Henrik Lissner
35ce37532b
ui/workspaces: merge +ivy/workspace/switch-to into +workspace/switch-to
Relevant to #2127
Closes #2130
2019-12-01 15:41:28 -05:00
Rudi Grinberg
4b77b413c5 Add ivy command for workspace switching 2019-12-01 16:13:40 +07:00
Rudi Grinberg
dd004dea79 Easier creation of named workspaces
When a user tries to switch to a named workspace that doesn't exist,
creat it, instead of just failing.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2019-12-01 15:10:51 +07:00
Henrik Lissner
4ccb69dbd0
ui/workspaces: fix unrenamed workspace on project-switch #1942 2019-10-25 02:42:54 -04:00