Projectile can consume a lot of cycles, especially in indirect buffers
or because of project-root-sensitive path segments in the modeline. This
experimental fix should spare you that heartache.
* Change projectile dirconfig file to .project
So it matches the doom project marker `.project`. Otherwise you need to
create both a `.project` and then a `.projectile` with the project
configuration.
To maintain backwards compatibility, it will prefer a `.projectile` file for
dirconfig if found.
Also:
- Reorder projectile variables.
- Remove unused projectile-sort-order (since ripgrep is a hard
dependency of Doom now, there should be no situation where we
projectile-sort-order is important to us as a default).
Projectile has `projectile-git-command` and
`projectile-git-submodule-command`. By default, these use `git ls-files`
and `git submodule foreach 'echo $path'`, respectively. It uses them
together to index a full list of project files.
Since we've changed `projectile-git-command` to use `fd` or `ripgrep`,
which indexes submodules just fine (unlike git ls-files), you get
duplicates when projectile does a second pass with
`projectile-git-submodule-command`, so we unset it completely.
This function isn't autoloaded so we should include it in the list of
commands like some other projectile functions.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit does two things:
- Renames def-advice! to defadvice!, in the spirit of naming convenience
macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
intent. A public advice function like doom-set-jump-a is meant to be
used elsewhere. A private one like +dired--cleanup-header-line-a
shouldn't -- it likely won't work anywhere but the function(s) it was
made to advise.
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.
- Adds the auto-minor-mode package to replace our in-house
implementation.
- Merges associate! into the def-project-mode! macro because associate!
on its own is less useful than auto-minor-mode-alist,
auto-minor-mode-magic-alist or hooks.
- Changes the semantics of :modes and :add-hooks properties of
def-project-mode!. Its arguments are evaluated as is; lists will need
to be quoted.
squash! core-lib: remove associate! macro
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:
1. Replace the bar | to indicate a hook function with a -h suffix, e.g.
doom|init-ui -> doom-init-ui-h
doom|run-local-var-hooks -> doom-run-local-var-hooks-h
2. And add a -fn suffix for functions meant to be set on variables,
e.g.
(setq magit-display-buffer-function #'+magit-display-buffer-fn)
See ccf327f8 for the reasoning behind these changes.
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.
In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.
doom*shut-up -> doom-shut-up-a
doom*recenter -> doom-recenter-a
+evil*static-reindent -> +evil--static-reindent-a
The rationale behind this change is:
1. Elisp's own formatting/indenting tools would occasionally struggle
with | and * (particularly pp and cl-prettyprint). They have no
problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
github markdown) struggle with it, sometimes refusing to highlight
code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
on haphazardly way back when Doom was simply "my private config".
Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.
Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
macro. The old pair weren't as useful. The new def-advice! saves on a
lot of space.
- Removed "stage" assertions to make sure you were using the right
macros in the right place. Turned out to not be necessary, we'll
employ better checks later.
This way, projectile caches won't expire when restarting Emacs, but
instead time + projectile-files-cache-expire seconds from the time it is
serialized.
Caused when using projectile-{run,test,compile,configure}-project
commands in a project that projectile cannot recognize (i.e. doesn't
match any project in projectile-project-types).