Commit graph

16 commits

Author SHA1 Message Date
Henrik Lissner
4fc11b696e
tweak: projectile: don't follow symlinks by default
Experienced users (the type to use symlinks in their projects) can add
-L back to `projectile-git-fd-args`, otherwise, its poorer UX for
beginners if Projectile indexes symlinked build artifacts (like 'result'
symlinks by Nix); i.e. things they didn't symlink themselves.

Fix: #7781
2024-09-07 14:20:29 -04:00
Henrik Lissner
bf9e619533
refactor: remove redundant projectile-track-known-projects hook
With the `doom-switch-buffer-hook` hook in 83fedf1, this hook isn't
needed anymore.

Amend: 83fedf1fff
2024-08-30 01:02:33 -04:00
Henrik Lissner
83fedf1fff
fix: recursive load errors on lib/projects.el
A change upstream was causing recursive load errors. I'm not too clear
how it happens, as I can't reproduce it, but
bbatsov/projectile@3c92d28c05 is the common thread (bumped in
c1b5f48).

Rather than revert the bump, I've just undone the hook and used a saner
hook for the same task. It is a stopgap solution until I eventually
replace projectile with project.el.

Ref: bbatsov/projectile@3c92d28c05
Amend: c1b5f48f07
2024-08-29 06:56:57 -04:00
Henrik Lissner
6077b6f0d8
fix: correct version string in obsoletion calls 2024-08-26 18:07:47 -04:00
Henrik Lissner
95e0b43012
fix: "Malformed pattern in custom ignore file .project" error
I introduced '--ignore-file .project' to `projectile-git-fd-args` in
4fcf332  expecting fd to ignore the file if it didn't exist, but it
throws an error if it doesn't, causing it to throw these errors in any
project without a .project file.

Amend: 4fcf332749
2024-08-12 19:46:40 -04:00
Henrik Lissner
f5020a4f7f
refactor: simplify projectile config
Reverts projectile-project-root-files-bottom-up to its original value,
since the absence of those VC entries may surprise folks who aren't new
to projectile.
2024-08-09 21:21:26 -04:00
Henrik Lissner
d04e1404c2
fix: projectile: ignore more vc directories in file listings 2024-08-09 21:03:46 -04:00
Henrik Lissner
4fcf332749
refactor: generalize fd/ripgrep vars & options
I intend to eventually replace projectile with project.el, so these
doom-projectile-* variables need to be generalized, starting with the
fd/ripgrep executable paths.

ALong with that, this refactors Doom's projectile-generic-command to
lean more on built-in fd support in projectile, where possible (fewer
wheels reinvented).

Ref: doomemacs/core#1
2024-08-09 21:03:37 -04:00
Henrik Lissner
939fc0d322
feat: add project-vc config
I intend to keep `project-vc-extra-root-markers` much lighter than what
`projectile-project-root-files` ended up being, so I won't be
transferring all the root markers.

Ref: doomemacs/core#1
2024-08-09 20:50:51 -04:00
Henrik Lissner
e24a583d5c
tweak: move project-list-file to profile data dir
Ref: doomemacs/core#1
2024-03-24 18:03:13 -04:00
Henrik Lissner
659f7bfc71
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
Henrik Lissner
6ddaed5cdd
nit: comment revision and formatting
For clarity, to enforce conventions, and explain the unexplained.
2022-09-16 01:14:22 +02:00
Henrik Lissner
e87fd8ac13
fix: validate fd --version output
Ref: https://discourse.doomemacs.org/t/3144
2022-09-07 01:48:37 +02:00
Henrik Lissner
42ac62df74
fix: defer projectile's project cleanup
There are two issues here.

1. Projectile uses file-remote-p to check for remote (tramp) paths in
   its known project list, when it automatically cleans it up on
   projectile-mode's activation. This causes tramp.el to be loaded,
   which is expensive.
2. file-remote-p relies on an entry in file-name-handler-alist
   (autoloaded by tramp.el) to detect remote paths, which causes tramp
   to be loaded. However, Doom sets file-name-handler-alist to nil at
   startup for a noteable boost in startup performance.

   Normally, this is not an issue, as I defer projectile-mode until well
   after file-name-handler-alist is restored, but it is trivial for a
   user to inadvertantly load it too early (often as part of another
   package that depends on it, or by blindly following projectile's
   install instructions and calling projectile-mode themselves).

In order to address both of these, I defer projectile's cleanup process
altogether. Another approach I considered was to ensure projectile-mode
wasn't activated until the right time, regardless of when projectile is
loaded, but this may trouble savvier Emacs users who need projectile's
API early during startup, so it needs more consideration.

Fix: #6552
Ref: bbatsov/projectile#1649
2022-09-06 22:55:47 +02:00
Henrik Lissner
232e9d4b91
fix: use --strip-cwd-prefix only if fd >=8.3.0
Since fd 8.3.0 has low availability across distros (see repology link
below), I don't want to make it Doom's minimum supported version.
Instead, I do a quick version check and adjust accordingly. I'll think
up a more elegant solution after v3.

Ref: https://repology.org/project/fd-find/versions
Fix: #6618
Fix: #6600
Close: #6597
2022-08-08 18:23:46 +02:00
Henrik Lissner
b9933e6637
refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.

  (after! core-cli-ci ...)

To fix it, simply s/core-/doom-/, i.e.

  (after! doom-cli-ci ...)

What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/

Ref: #4273
2022-07-30 22:41:13 +02:00
Renamed from core/core-projects.el (Browse further)