Commit graph

47 commits

Author SHA1 Message Date
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
Henrik Lissner
a3fa1e07b1
Refactor doom/kill-*-buffer commands 2019-10-10 16:11:42 -04:00
Henrik Lissner
d297dc6934
Minor refactor & comment revision across the board 2019-10-03 23:33:59 -04:00
Henrik Lissner
3f7e0fd103
Fix +workspace/delete changing workspaces
...when deleting other workspaces.
2019-09-29 23:12:43 -04:00
Henrik Lissner
060f6a36d3
Fix +workspace/delete initially filtering workspaces
SPC u SPC TAB d will prompt you for the workspace you want to delete,
with the name of the current workspace prefilled into the the
minibuffer. This filters out all other workspaces from the get go, which
may fool you into thinking you can only delete the current workspace.

Now it only selects the current workspace by default, without filtering
them.
2019-09-29 12:50:20 -04:00
Henrik Lissner
525193f94b
ui/workspaces: fset -> defalias
Allows these commands to be advised.
2019-09-26 17:55:33 -04:00
Henrik Lissner
e10cd8cf2e
Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
Henrik Lissner
5e0177d667
ui/workspaces: conform to new hook/advice conventions 2019-07-22 02:37:47 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
80958c0c17
Ensure non-dedicated window is active on workspace creation
Otherwise, workspaces are left in a broken state where they only contain
dedicated/side-windows, which Emacs can't handle well.

Indirectly fixes #1492
2019-06-14 12:34:23 +02:00
Henrik Lissner
bc6c4b3e37
Add +workspace/other #1480
- Rename +workspace/switch-to-last to +workspace/switch-to-final, to
  avoid ambiguity.
- Add +workspace/switch-to-N commands
2019-06-11 16:12:06 +02:00
Henrik Lissner
e7c12b1bb6
ui/workspace: minibuffer-message -> message
minibuffer-message adds 2 seconds to emacsclient calls that create new
workspaces.
2019-06-10 09:38:55 +02:00
Henrik Lissner
2214c3175e
Minor tweaks across the board 2019-05-21 00:34:32 -04:00
Henrik Lissner
928ec16242
ui/workspaces: remove unused function 2019-05-19 02:17:59 -04:00
Henrik Lissner
d1c9c3fc91
A more reliable +workspace-list-names
In case the cache goes stale.
2019-05-05 14:25:03 -04:00
Henrik Lissner
eb62dde5d3
Fix ui/workspaces autoloads & tests 2019-04-25 22:20:31 -04:00
Henrik Lissner
fc511ed701
ui/workspaces: minor refactors 2019-04-24 18:27:40 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00