Commit graph

165 commits

Author SHA1 Message Date
Henrik Lissner
c3ac295f7d
Remove Icon^M from projectile-globally-ignored-files
Can break file indexing over TRAMP.
2020-07-31 16:01:16 -04:00
Henrik Lissner
351e7036d9
doom-cleanup-project-cache-h: do nothing if caching is disabled 2020-07-31 16:00:52 -04:00
Henrik Lissner
da1030985d
Minor refactors & reformatting 2020-07-23 01:26:03 -04:00
Henrik Lissner
4205f1bbea
Fix #3591: wrong-type-arg stringp from projectile 2020-07-19 16:45:45 -04:00
Henrik Lissner
523e945a3a
Fix #3215: ripgrep reporting error code 2 on Windows
Closes #3512
2020-07-17 19:24:26 -04:00
Henrik Lissner
00ebbafb96
Fix #3455: wrong-number-of-args on executable-find call
executable-find's second argument was added in Emacs 27, so 26 users
would suffer this error.

Closes #3460
2020-06-25 15:27:26 -04:00
Henrik Lissner
d034bc2004
Fix #3425: eagerly resolve path to fd executable
This ensures that the correct binary is found, even if you're remoting
onto a system where `fd` is named `fdfind`.
2020-06-24 19:49:08 -04:00
Saál Germán Gutiérrez Calderón
3c7b64c5b0 Enable projectile-locate-dominating-file on tramp 2020-06-22 11:37:11 -05:00
Henrik Lissner
4e193dbbd3
Bump :core
raxod502/straight.el@09cfa1b -> raxod502/straight.el@ffaad60
bbatsov/projectile@7e552b6 -> bbatsov/projectile@95bcc7d
2020-06-17 14:34:52 -04:00
Henrik Lissner
67c5de0313
Change :around advice to :override 2020-06-13 17:13:38 -04:00
Henrik Lissner
10f5916298
Only use projectile-generic-command
Rather than the 7 different commands for indexing the project's files.

This also fixes an issue with #3377, where changes to
`projectile-globally-ignored-directories` weren't seen unless they were
done at startup, before projectile loads.
2020-06-13 17:01:09 -04:00
wedens
79f62a6d3e make fd respect projectile-globally-ignored-directories 2020-06-13 23:31:12 +07:00
Henrik Lissner
f548ab600c
Fix #2351: counsel-rg errors on Windows 2020-06-05 00:43:51 -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
2d4b946e03
Clear project-root cache before switching project
Fixes #3205
May address #3166
2020-06-01 18:16:26 -04:00
Henrik Lissner
3a38fc633c
Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00
Henrik Lissner
49bf79a380
Restore .projectile recognition
Why it was removed in the first place: hlissner/doom-emacs#1974

Why it's being restored: seems this causes too much confusion. Folks ask
why projectile doesn't recognize their projects. It's too much of
maintenance hassle. We'll deal with the breaking changes project.el will
introduce when we cross that bridge.

Closes #3074
2020-05-19 01:56:56 -04:00
Henrik Lissner
0e851ace9b
Backport bits of CLI rewrite
The rewrite for Doom's CLI is taking a while, so I've backported a few
important changes in order to ease the transition and fix a couple bugs
sooner.

Fixes #2802, #2737, #2386

The big highlights are:

- Fix #2802: We now update recipe repos *before* updating/installing any
  new packages. No more "Could not find package X in recipe repositories".

- Fix #2737: An edge case where straight couldn't reach a pinned
  commit (particularly with agda).

- Doom is now smarter about what option it recommends when straight
  prompts you to make a choice.

- Introduces a new init path for Doom. The old way:
  - Launch in "minimal" CLI mode in non-interactive sessions
  - Launch a "full" interactive mode otherwise.
  The new way
  - Launch in "minimal" CLI mode *only* for bin/doom
  - Launch is a simple mode for non-interactive sessions that still need
    access to your interactive config (like async org export/babel).
  - Launch a "full" interactive mode otherwise.

  This should fix compatibility issues with plugins that use the
  async.el library or spawn child Emacs processes to fake
  parallelization (like org's async export and babel functionality).

- Your private init.el is now loaded more reliably when running any
  bin/doom command. This gives you an opportunity to configure its
  settings.

- Added doom-first-{input,buffer,file}-hook hooks, which we use to queue
  deferred activation of a number of packages. Users can remove these
  modes from these hooks; altogether preventing them from loading,
  rather than waiting for them to load to then disable them,
  e.g. (after! smartparens (smartparens-global-mode -1)) -> (remove-hook
  'doom-first-buffer #'smartparens-global-mode)

  Hooks added to doom-first-*-hook variables will be removed once they
  run.

  This should also indirectly fix #2386, by preventing interactive modes
  from running in non-interactive session.

- Added `doom/bump-*` commands to make bumping modules and packages
  easier, and `doom/bumpify-*` commands for converting package!
  statements into user/repo@sha1hash format for bump commits.

- straight.el is now commit-pinned, like all other packages. We also
  more reliably install straight.el by cloning it ourselves, rather than
  relying on its bootstrap.el.

  This should prevent infinite "straight has diverged from master"
  prompts whenever we change branches (though, you might have to put up
  with it one more after this update -- see #2937 for workaround).

All the other minor changes:

- Moved core/autoload/cli.el to core/autoload/process.el
- The package manager will log attempts to check out pinned commits
- If package state is incomplete while rebuilding packages, emit a
  simpler error message instead of an obscure one!
- Added -u switch to 'doom sync' to make it run 'doom update' afterwards
- Added -p switch to 'doom sync' to make it run 'doom purge' afterwards
- Replace doom-modules function with doom-modules-list
- The `with-plist!` macro was removed, since `cl-destructuring-bind`
  already serves that purpose well enough.
- core/autoload/packages.el was moved into core-packages.el
- bin/doom will no longer die if DOOMDIR or DOOMLOCALDIR don't have a
  trailing slash
- Introduces doom-debug-variables; a list of variables to toggle on
  doom/toggle-debug-mode.
- The sandbox has been updated to reflect the above changes, also:
  1. Child instances will no longer inherit the process environment of
     the host instance,
  2. It will no longer produce an auto-save-list directory in ~/.emacs.d
2020-05-15 01:33:52 -04:00
chuxubank
8a70dd0379 Change path separator on Windows when using fd
Show slash instead of backslash
2020-05-14 16:07:04 +08:00
Henrik Lissner
b51c4fc8b3
Fix projectile on Windows failing to index anything with ripgrep
Due to unescaped glob arguments.

Fixes #2897, and possibly #1803
2020-05-02 17:41:36 -04:00
Henrik Lissner
ea1a1805b3
Fix projectile failing to index symlinks
Fixes cases where, if the contents of your ~/.doom.d were symlinks, fd
and ripgrep wouldn't index them (or recurse into them), so it'd miss out
of many files.

Possibly fixes #1803
2020-05-02 16:28:48 -04:00
Henrik Lissner
e832ec5708
Fix projectile ignoring symlinks
Due to the underlying program (fd) ignoring them.
2020-05-02 13:17:10 -04:00
Henrik Lissner
ae152a5924
Cache project root earlier
So users can still change it with setq-hook! or their own hooks.
2020-04-29 03:41:32 -04:00
Henrik Lissner
9acba6b269
Speed up project root detection by resolving it less often
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.
2020-04-27 17:27:32 -04:00
Henrik Lissner
06d5d5e6c0
General refactors, reformatting & comment revision 2020-04-23 23:56:17 -04:00
Henrik Lissner
99c5bac359
Correct projectile comment 2020-04-11 14:51:15 -04:00
Henrik Lissner
011bbff7af
Clarify how projectile resolves project roots 2020-04-07 22:32:52 -04:00
James Ravn
68eb41faa3
Change projectile dirconfig file to .project (#2829)
* 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.
2020-04-07 17:31:44 -04:00
Henrik Lissner
50c61c57bc
Update def-project-mode! macro docstring
Remove mention of `doom-project`, since it no longer exists.
2020-02-22 20:38:34 -05:00
Henrik Lissner
f7445a10db
General refactor & reformatting across the board 2020-02-18 22:56:47 -05:00
Henrik Lissner
5bff064ba8
Reduce number of projectile project root markers
Reduce overall I/O needed to detect project roots, at the expense of
losing detection for less popular version control systems.
2019-12-22 23:53:05 -05:00
Henrik Lissner
86c2d7c10a
No longer retain projectile cache across sessions
It's unnecessary overhead. Rebuilding the index the first time it is
used per session is acceptable, imo.
2019-12-22 23:53:05 -05:00
Henrik Lissner
213a6fda86
General refactors & reformatting 2019-12-22 23:53:04 -05:00
Henrik Lissner
a999a0ddd6
General refactors & comment revision 2019-12-19 14:51:34 -05:00
Henrik Lissner
cdf4604288
Reduce file cache timeout from 7 days to 1
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).
2019-12-13 20:07:41 -05:00
Henrik Lissner
078e563355
Prevent duplicates in projectile file lists
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.
2019-12-13 17:28:33 -05:00
Henrik Lissner
f959147218
Reset projectile-use-git-grep
Other search engines are no longer our responsibility.
2019-11-28 15:36:07 -05:00
Henrik Lissner
fb13b902b0
Minor comment/doc revision & refactors 2019-11-21 14:46:45 -05:00
Henrik Lissner
263c82def1
Remove references to old ivy/helm search commands
And consolidate ex commands into :pg[rep][!] and :pg[rep]d[!].
2019-11-18 15:06:11 -05:00
Henrik Lissner
2a6b1a1fb6
Unset projectile-git-submodule-command if tr is unavailable
Otherwise windows users can't use projectile in projects with
submodules.
2019-10-29 11:36:46 -04:00
Henrik Lissner
8cedbc3b5d
Prioritize fdfind over fd #1931
Since fd is used by another program on Ubuntu.
2019-10-22 12:40:30 -04:00
Henrik Lissner
7cbd6c756c
Remove projectile-add-known-project autoload
Merged upstream in bbatsov/projectile#1457
2019-10-20 10:58:53 -04:00
Henrik Lissner
9b25582be1
Reduce list of root files projectile searches for
And define them on a per-module basis. This reduces the number of file
checks it performs, particularly for non-project files.

Might help #1317
2019-10-19 22:22:49 -04:00
Rudi Grinberg
78f808d31e Fix uses of projectile-locate-dominating-file
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>
2019-10-13 11:37:06 +09:00
Henrik Lissner
4cafaec527
Disable projectile-grep for +{ivy,helm}/grep 2019-10-10 16:11:41 -04:00
Henrik Lissner
d297dc6934
Minor refactor & comment revision across the board 2019-10-03 23:33:59 -04:00
Henrik Lissner
29055ae6a3
Disable projectile-{ag,ripgrep}
Emit warnings for commands that won't work, as is, and that Doom
already provides a better alternative for.
2019-09-06 14:17:34 -04:00
Henrik Lissner
4b736bef68
Introduce doom-interactive-mode
As soft inverse alias for noninteractive; this makes it easier to unit
test functionality that depends on the session type.
2019-09-03 00:37:30 -04:00
Henrik Lissner
d1a299b9f5
Fix #1719: sole :when in def-project-mode! 2019-08-29 20:05:34 -04:00
Henrik Lissner
851b51357e
Fix #1712, #1719: project minor modes not activating 2019-08-28 15:17:40 -04:00