With https://github.com/Alexander-Miller/treemacs/issues/592 merged,
treemacs now fully supports perspective mode. That is, each treemacs
buffer is scoped to a perspective and initializes itself using projectile.
This change re-enables treemacs-persp, enables the `Perspectives` scope,
and adjusts the doom treemacs init behavior to support the new
treemacs-persp behavior.
I haven't been able to reproduce the prior errors with melpa so I think
this is safe to re-enable now. In my testing it seems to work
flawlessly, both with and without persp-mode enabled.
Only one issue is that users might need to remove their treemacs persist
file (`~/.emacs.d/.local/cache/treemacs-persist`) after this change if
using persp-mode. I'm not sure if it is necessary since I blew away my
own before testing.
A common bug report is that straight cannot see treemacs-persp in MELPA.
Perhaps the MELPA repo isn't being updated properly -- I have no idea,
but since this package isn't doing anything at the moment, I will simply
remove the package until I have time to look into it further.
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.
Also changes def-package-hook! -> use-package-hook!
The old macros are now marked obsolete and will be removed when straight
integration is merged.
: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.
Because treemacs--last-error-persist-file is defined with defconst, its
default value will overwrite our custom one once the
treemacs-persistence package is loaded.
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.
+ doom-project-p & doom-project-root are aliases for
projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
consistency, since projectile-project-name and
projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
Can be disruptive if you've got many windows with buffers across
different projects. Also, SPC o P is available to "jump to current file"
in the treemacs window.
This has proven intrusive, especially when you have files from different
projects open and you switch between them rapidly. Enabling
treemacs-follow-mode is left up to the user. Otherwise, the SPC o P
keybind and treemacs-find-file command can this manually and on-demand.
Also remove hide-mode-line-mode from treemacs because it's redundant
with the doom-themes treemacs icon theme.
Alexander-Miller/treemacs#212 introduced treemacs-persist-file, which we
now use instead of tools/treemacs' old treemacs-persistence hack (which
didn't work).
Relevant to #669